I have a rather simple copy and paste batch job. That checks for a more recent file and overwrites it.
I was trying to take a single COPY and copy it to a second directory.
In simple, this Batch is to replace Files on a System (Upgrade) But i would also like a copy of all files replaced in one folder. As my Xcopy is checking Datestamp prior to replacing. Then i cannot use the Same command again to copy to an additional directory
(I only want replaced / more recent files in a additional directory)
xcopy "\\DIR1\e\DIR2\DIR3" C:\ROot\System /d /y /r xcopy "\\DIR1\e\DIR6\DIR8" C:\ROot\System /d /y /r xcopy "\\DIR1\e\DIR5\DIR6" C:\ROot\System /d /y /r xcopy "\\DIR1\e\DIR4\DIR2" C:\ROot\System /d /y /r ::@pause
So only if the file is more recent, is it replaced. How can i use the files its replaced and put them into a Upgrade folder for example:
xcopy "\\DIR1\e\DIR2\DIR3" C:\ROot\System C:\ROot\System\Upgradefile /d /y /r
i.e. C:\ROot\System\Upgradefile would be the additional folder all files are copied to that where replaced in C:\ROot\System
Just incase: /d=(Date) /y=Overwrite file is more recent /r=Overwrite Read only