[AccessD] Add Date/Time Stamp to xcopy target

Jim Lawrence accessd at shaw.ca
Thu Apr 14 16:44:28 CDT 2011


I have a chuck of code that actually creates a new directory, using the
current date and then copies the information into into and the system runs
this batach file every and has been running for years...It is only limited
by the size of the backup drive.

:: The complete data backup  
@echo off
set dt=none
for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set dt=%%k%%i%%j

md c:\backups\%dt%
cd c:\backups\%dt%

echo Create Master Backup
xcopy s: c: /y /q

echo Update completed...
ping -n 10 127.0.0.1 >NUL
exit

HTH
Jim



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Thursday, April 14, 2011 1:05 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Add Date/Time Stamp to xcopy target

Dear List:
 
Client wants to do regular backup to his EHD using Windows Scheduler.  He's
almost there but has a question:
 
The following in a batch file seems to work for backing up DocketWorks: 

 

xcopy "W:\DWData.mdb" "C:\ProgramData\DocketWorks"

 

Do you know if there is some way to append a date time stamp to it so it
does not always overwrite the previous backup? 

Anyone know?

 

TIA

 

Rocky

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list