PDA

View Full Version : script idea - last file modified on PC


hindesite
07-May-2004, 09:30 AM
I am wanting to use the command-line execution of BC and a script to copy to my desktop files that were just "touched". Essentially I am wanting to create a utility that will allow me to trap files changed on my PC locally as I get in and get out of any application.

Anyone tried this, or have any ideas?

Also - please reply if you have created a script to execute a personal backup of datafiles on your PC.

Danny Hindes
dannyhindes@yahoo.com

Chris
07-May-2004, 01:48 PM
Hi Danny,

You should be able to do this with two scripts.
In the first script, take a snapshot of your system (probably your C: drive). Don't include CRC's in the snapshot unless you really need them, because it will be very slow.
Run the program you want to monitor.
Run the second script and compare the snapshot to the c: drive. Select newer, different, and orphan files and then copy them using the copyto command.

For both scripts you will probably want to filter out the directory where you're storing the snapshots and the directory where you are copying the changed files to.

If you're going to do this for multiple programs, you can call the scripts with a batch file and pass the batch file the name of the program to run using %1 in the batch file for the first argument on the command line.

As far as backup of your pc, you should just be able to use the sync command using the update option. If you want to do the backup regularly, you can automate the mirror using instructions from our knowledge base at:
http://www.scootersoftware.com/support.php?c=kb_schedule

If you need help with writing any of the above scripts, please let me know.