Link to home
Start Free TrialLog in
Avatar of savageje
savageje

asked on

Batch script to copy updated files...

Hi Experts,

I have an issue with scripting and file copying.  Essentially I want to copy a file (leave a copy in the source directory) from a directory of files if it’s been updated, into a new destination folder, much like Robocopy with the /mon does.  The file would retain the same file name after update.

However, in the destination folder it the file will be deleted after imported into an Electronic Content Mgmt (ECM) system.  Robocopy does not like this and will try and put all the files from the source that it copied into the destination folder on the next run.  Any thoughts on a good approach to this?  I’d like to use a batch file with scheduled task.  Here is an example:

Source Folder “A” with many files.
-A file is updated
-Robocopy (or other solution) monitors the update on the run and copies it into Destination Folder “B.”
-File is then imported into ECM solution
-Robocopy should not re-copy the file from the source back into the destination unless further changes have been made.

I chose Robocopy for initial use because of its great Monitoring features.

Thanks for your help!
ASKER CERTIFIED SOLUTION
Avatar of godspropy
godspropy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of savageje
savageje

ASKER

Thank you for the suggestion.  I didn't even think to use the attribute switch.  It did exactly what I needed it to.

Thanks!