On Linux, there is a bash command to copy files, and if the file is already in the destination, to take the newer one based on its timestamp.

cp -u source destination

The description of this option is:

-u, --update - Copy only when the source file is newer than the destination file or when the destination file is missing.

Is there such a command for Windows Command Prompt as well? Or can I achieve the same result via other relatively simple means (for free)?


Use robocopy with the /XO flag to exclude copying older files.

If you're copying to another machine then you may also wish to use /FFT which introduces a tolerance of ± 2 seconds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.