robocopy to transfer only newest .bak in folder, is it possible?

FLATcura

Weaksauce
Joined
Oct 20, 2006
Messages
96
so here is the scenario

i have a few SQL databases some 2000 some 2005

and they have second drives for the db backups, but i want to transfer only the newest backup out of each folder and put them on my backup server

i do daily db backups so each folder has 2 weeks worth of backups in them
is there an xcopy or robocopy script or some batch file syntax...that will only copy the file with the most recent date?
ive been looking around, and i really suck at xcopy

right now i use a script to copy everything from one folder and overwrite everything in the destination folder
xcopy /e /v /y C:\ftp \\192.168.1.10\Shared\Program_Backup

on the server itself i want all 2 weeks worth of backups in case i ever need to rollback, but the backup server is more for worst case scenario, like the server explodes or the building catches fire :p so i only need a single copy of the most recent data

i appreciate any help i can get on this

thanks :)
 
Back
Top