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

xcopy only the today files to another location

1 of my servers dlt unit fails, i need  for a few days do the backup to another server,

i want to
xcopy d:\*.*  w:\  but only the files that are modified today in order to porcese a sheduled bath at night
is any way to achive this with a bat file?
tsm
edo
0
Ernesto
Asked:
Ernesto
1 Solution
 
Ken ButtersCommented:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true

See /d switch:

/d[:mm-dd-yyyy] : Copies source files changed on or after the specified date only. If you do not include a mm-dd-yyyy value, xcopy copies all Source files that are newer than existing Destination files. This command-line option allows you to update files that have changed.

For your example... changed on 5/14/2013 or later:

xcopy d:\*.*  w:\  /d:05-14-2013
0
 
ErnestoAuthor Commented:
tsm

xcopy d:\  w:\  /s /a /D:5-14-2013
@pause
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

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