| ▲ | GeneralMaximus 5 hours ago | |
Yes! I'm currently working on a script that modifies a bunch of sensitive files, and this the approach I'm taking to make sure I don't accidentally lose any important data. I've split the process into three parts: 1. Walk the filesystem, capture the current state of the files, and write out a plan to disk. 2. Make sure the state of the files from step 1 has not changed, then execute the plan. Capture the new state of the files. Additionally, log all operations to disk in a journal. 3. Validate that no data was lost or unexpectedly changed using the captured file state from steps 1 and 2. Manually look at the operations log (or dump it into an LLM) to make sure nothing looks off. These three steps can be three separate scripts, or three flags to the same script. | ||