Is it possible to make a batch script only XCOPY the files from a source if they are older than the ones in the destination? I’m trying to archive Roblox versions. I tried /D, but that just makes it copy the files from the source if it is newer than the one in the destination. I just want this because it is possible to change the Roblox files through the Versions folder, and I don’t want my changed files to be saved to an archive. Roblox recently changed the death sound from the iconic “Oof!” to this really bad “Teh!”. I want to change it back to the “Oof!” sound effect, but then if I do that and the task runs, the copy will have the “Oof!” sound effect, instead of the “Teh!” sound effect. If you need more information, I made another post a few days ago, and I am continuing off of it. Here’s the post. The script I am using is:
DIR C:UsersUSERNAMEAppDataLocalRobloxVersions
XCOPY /E /V /C /H /K /Y /J /D /O /X C:UsersUSERNAMEAppDataLocalRobloxVersions* "D:REALNAMEFile HistoryRoblox Version Archive"
DIR "D:REALNAMEFile HistoryRoblox Version Archive"
Flag meanings:
/E Copies directories and subdirectories, including empty ones
/V Verifies the size of each new file
/C Continues copying even if errors occur
/H Copies hidden and system files also
/K Copies attributes
/Y Suppresses prompting
/J Copies using unbuffered I/O. Recommended for very large files
/D Copies all Source files that are newer than existing Destination files.
/O Copies file ownership and ACL information
/X Copies file audit settings
So my question is, is there a flag/script that disables overwriting if the source has a newer version than the destination?