Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy files before overwrite

Status
Not open for further replies.

NHW

Programmer
Mar 16, 2004
24
0
0
HK
Hi. I'm using an application that allows users to save multiple files at the same time. Each filename is based on a property which may not be unique. In case there are duplicate filenames, the application will ask whether the user wants to overwrite. If so, it will do so. And if not, the save will skip that file.

Since I have no control over that application, I wonder if there's anyway to copy/move the file first before it gets overwritten. I tried modifying the code here:
and have the script make a copy of the file to another folder once a new file is created, but it does not quite work because the file gets overwritten already before I can copy/move it.. seems like the application acts faster than my script.

Any ideas very much appreciated. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top