• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 504
  • Last Modified:

Windows XP - copying files and replacing them in Destination folder ONLY IF NEWER

I have a folder on my "C" drive and a folder on my flash drive "F" and would like to copy files from "C" to "F" and replace only those older "F" resident files with my newer "C" files.
What tool do I use to do this?
2 Solutions
Thomas GrassiSystems AdministratorCommented:
Pradeep DubeyConsultantCommented:
you can use robocopy tool to copy older folders only. see the examples given below in the link :

Move files over 14 days old (note the MOVE option will fail if any files are open and locked).
ROBOCOPY C:\SourceFoldern D:\DestinationFolder /move /minage:14

Open in new window

Similarly you could use the below switches
/maxage: <N>     Specifies the maximum file age (to exclude files older than N days or date).
/minage: <N>      Specifies the minimum file age (exclude files newer than N days or date).
/maxlad: <N>      Specifies the maximum last access date (excludes files unused since N).
/minlad: <N>       Specifies the minimum last access date (excludes files used since N) If N is less than 1900, N specifies the number of days. Otherwise, N specifies a date in the format YYYYMMDD

Robocopy is probably the best option however you can also use:

XCOPY’s /D switch.  It will copy only new/changed files.

xcopy "%source%" "%destination%" /D /Y

The /Y will prevent it from prompting.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Use can use Robocopy

Robocopy  c:\ f:\ /E /Z /FFT /MIR >c:\util\robo.txt

You will need to use the script first to copy the whole files/folders that you want to copy and after that it will be copy the difference or only the modification.

If this is a home pc you can use an app like allwaysync or create_synchronicity to do the job on a schedule or use a batch file with xcopy /n which updates the file that already exist in the destination file
Gary CaseRetiredCommented:
Any synchronization utility will allow this.

The freeware version of SyncBack is an excellent choice:   http://www.2brightsparks.com/syncback/
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now