Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I work on my laptop to create a number of files of varying formats in nested sub-directories. Other files also exist in these directories that I am not interested in copying.

Essentially, I want to copy all files named LTJ*.* from one directory on my laptop (including all subdirectories) to a single destination directory on mapped network drive, only if file is new or the source file timestamp is newer than existing destination file.

This way only new or edited files get copied over, saving time. This is important as the connection via VPN to my HQ network drive is painfully slow. I can sometimes do the copy procedure nice and quickly at the office (not using the VPN) when I am there but this is quite infrequent.

I imagine a batch file type solution being the ideal way to go on this, and my limited knowledge ran out when it came to searching all subdirectories and copying and comparing date and time stamp on files already copied.

How can I implement something like this?

share|improve this question
This link should have the answer you are looking for – spuder Aug 2 '13 at 15:53

xcopy /d will only copy if newer. Should be fairly easy to combine this with FIND or DIR to get any files and their paths that match your naming.

share|improve this answer

How about some backup software. I use the free version of SyncBack and it will have no problem identifying new and changed files and then backing them up or synchronizing them elsewhere.It also has pretty extensive filtering capabilities that should enable you to exclude files from the backup set.

This is a much more robust solution in terms of the software managing the process and providing good feedback logs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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