| 1. |
Solve : Batch file keeps copying a few of the same files? |
|
Answer» I created a batch file with a scheduled task that copies files from C to D, no problem. I used the following switches /d /y /s. I then created the same batch file to copy from the D drive to a network drive G. Copies files changed on or after the specified date. Sounds like more of a date/time problem than the archive bit (the /k switch). Try using with a hardcoded date or one you develop in your batch file. Happy Computing. 8-)I don't know how to use a hard coded date or develop one in a batch file. Please explain? Of course you were correct in that I an using Xcopy. Any and all help is welcome. ThankHardcoding a date would be something like this: xcopy /d:12-31-2005 /y /s ..... Developing a date that moves from day to day in a batch file is problematic. Batch files do not do date/time arithmetic without jumping thru HOOPS. Perhaps after each file(s) are copied, you could look into the ATTRIB command to set the archive bit and then use XCOPY with the /a switch so only files not archived are copied. If you need to post back, please mention your OS. Hope this gives you some ideas. 8-) |
|