Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy files based on date

Status
Not open for further replies.

aussoft

Technical User
Nov 27, 2003
4
AU
I need to copy a huge share from a old server to a new one. What i would like to do is copy only the files created in the last two years but keep the same directory structure. Does anyone know how i could copy files based on date?
 
This can be very easily done with the old DOS command Xcopy. How easily we forget!
 
That true, xcopy will do it, but what would the ccommand look like in order to copy just the last 2 years

cheers
 
XCOPY {source} {destination} /D:12-09-2001 /E/R/H/Y

should probably work - can't say I've ever used /D with XCOPY though but the XCOPY help (XCOPY /?) says m-d-y format...
 
Yes, that's it and i used the /D:01-01-2001 and /E /C where /E copies the entire directory structure including empty ones and /C continues even if an error occurs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top