Need xcopy script help

cvaughn8086

New member
Local time
6:49 PM
Messages
2
I'm looking for a script that will allow me to copy and "overwrite" all files with a date and time stamp BEFORE a certain date. The source files will NOT be deleted and all permissions will stay the same in destination directories. Copy does include subfolders as well. Any ideas?
 

My Computer

OS
Windows 7 Ent 32 bit

My Computer

Computer Manufacturer/Model Number
Home Build.
OS
Windows 7 Home Pre
CPU
Q8200 Intell 2.333
Motherboard
Asus P5Q3 Delux
Memory
DDR3 1333 4gig
Graphics Card(s)
Ati HD4870
Sound Card
Onboard Soundmax. 7.1
Monitor(s) Displays
1, 20" Samsung
Screen Resolution
1600/900
PSU
Good enough
Case
Le Shark
Cooling
FAN FAN FAN FAN, Thermaltake Minitype 90 with speed fan 4.
Keyboard
Standard, Gaming Wolfking
Mouse
Cm-storm-inferno-wired-gaming-mouse
Internet Speed
Sky Crappy upto 20meg I get a whapping 5.8mbs.
Thanks, but I don't believe robocopy will "overwrite" files with the same date and time stamp. I will be copying identical files and need to overwrite those files. The issue however is that I only want to overwrite files with a date and time stamp before 4/16/2011. From what I understand, xcopy will actually overwrite the files.
 

My Computer

OS
Windows 7 Ent 32 bit
Then in that case, MS-DOS xcopy command help and learn it. Its simple to do a batch code in txt doc and change too .bat and run it.
 

My Computer

Computer Manufacturer/Model Number
Home Build.
OS
Windows 7 Home Pre
CPU
Q8200 Intell 2.333
Motherboard
Asus P5Q3 Delux
Memory
DDR3 1333 4gig
Graphics Card(s)
Ati HD4870
Sound Card
Onboard Soundmax. 7.1
Monitor(s) Displays
1, 20" Samsung
Screen Resolution
1600/900
PSU
Good enough
Case
Le Shark
Cooling
FAN FAN FAN FAN, Thermaltake Minitype 90 with speed fan 4.
Keyboard
Standard, Gaming Wolfking
Mouse
Cm-storm-inferno-wired-gaming-mouse
Internet Speed
Sky Crappy upto 20meg I get a whapping 5.8mbs.
Why don't you just sort the files by time and only copy over/overwrite the ones over that are prior to the particular date and time?
 

My Computer

OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
Copy files changed on or after the specified date:

xcopy Source [Destination] [/d[:mm-dd-yyyy]]

Copy only files with date/time more recent than destination date/time:

xcopy Source [Destination] /D

/R overwite read only

/Y don't prompt for overwrite
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
This should work for you:

Code:
robocopy /COPYALL /IS /MINAGE:20110415

/COPYALL : Copy ALL file info (equivalent to /COPY:DATSOU).
/MINAGE:n : MINimum file AGE - exclude files newer than n days/date.
(If n < 1900 then n = no of days, else n = YYYYMMDD date).
/IS : Include Same, overwrite files even if they are already the same.
 

My Computer

OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
Copy files changed on or after the specified date:

xcopy Source [Destination] [/d[:mm-dd-yyyy]]

Copy only files with date/time more recent than destination date/time:

xcopy Source [Destination] /D

The first is only checking dates and times of the source file and it sounds like he want to replace based on destination date/time.

The second only checks the source date/time against the destination date/time and not a specified date/time, should this be different.
 

My Computer

OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
Back
Top