Forum Home
Press F1
 
Thread ID: 56977 2005-04-20 02:14:00 Copying files Helplesss (272) Press F1
Post ID Timestamp Content User
346882 2005-04-20 02:14:00 I have a series of zip files created for backups. What I want to do is using copy or xcopy in a batch file, only copy the latest *.zip file to another location. Can it be done? Thanks in Advance, Helplesss Helplesss (272)
346883 2005-04-20 02:21:00 What is the file/directory structure for these files? sal (67)
346884 2005-04-20 02:24:00 Do /xcopy /? to see its options . I am assuming that this is to be a frequent task, so it's worth making a batch file. (Sometimes it's quicker to do things manually than to automate them ;)).

xcopy can use the Archive attribute to decide what file(s) to copy, and then reset the bit. So with the appropriate options set it will copy today's file. But tomorrow, it won't copy that file again.

If you've got a number of files already there, you might want to use attrib (or the Windows "Properties" box) to turn off the Archive bit for them.
Graham L (2)
346885 2005-04-20 03:43:00 Thanks Graham L, your suggestion has some promise! Helplesss (272)
1