Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Modify Xcopy to copy only new files

Posted on 2008-10-22
3
Medium Priority
?
2,281 Views
Last Modified: 2012-08-14
I need to modify this xcopy to copy only new and changed files.
xcopy c:\mp3 M:\mp3 /s /y /h

Open in new window

0
Comment
Question by:mickeyshelley1
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
AmazingTech earned 2000 total points
ID: 22777124
/d without a date specified.
xcopy c:\mp3 M:\mp3 /s /y /h /d

Open in new window

0
 

Author Closing Comment

by:mickeyshelley1
ID: 31508764
Works Great thank you very much
0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22777791
Yeah the /d option is awesome. Although Microsoft also has another program called ROBOCOPY which has quite a bit more switches.

I would sometimes use a /l to list the new files to a text file before running it again without the /l so I have a log of which files are newer.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question