In the past on this list someone suggested 'Handy Backup'. I have been using it 
for a couple of years with no problems. Now it
 recently quit working. I sent the log and other information to their 
'support'. That was last week. No response. Everyday I am now
 using a batch file with XCOPY which works perfectly, however, I need to 
automate so it happens between midnight and early morning.
 The task manager won't work with the batch file (as far as I know) because I 
want to keep at least 7 older backups at all times -
 so the backup needs to be in a folder with the date in the name. The backup is 
on one computer: it backs up folders from 4
 other computers on the network.

Here is my batch file: (watch out for line wrap) the registry locations for 
XP02 SP2 - not sure about other os

@echo on
rem the directory must be something like: c:\-2007_07_05-\FolderName
rem REG  see what date format is in the registry
REG QUERY "HKCU\Control Panel\International" /v sShortDate
FOR /F "TOKENS=2,3*" %%A IN ('REG QUERY "HKCU\Control Panel\International" /v 
sShortDate') DO (FOR %%G IN (%%B) DO (SET
v_shortdate=%%G))
rem this is the shortdate %v_shortdate%
if %v_shortdate% == yyyy-MM-dd GOTO ymd
if %v_shortdate% == M/d/yyyy GOTO mdy
rem unknown date format
pause
quit

:mdy
rem you have M/d/yyyy     this is the format on xp03 (and also the default US = 
001 ->> MDY)
rem get the date into yy mm dd
FOR /F "TOKENS=2-4 DELIMS=/ " %%a IN ("%date%") DO SET mm=%%a&SET dd=%%b&SET 
yy=%%c
rem get the time into hh tt ss
FOR /F "TOKENS=1-3 DELIMS=:." %%a IN ("%time%") DO SET hh=%%a&SET tt=%%b&SET 
ss=%%c

rem Today's date is: %yy%_%mm%_%dd%
rem The time is: %hh%:%tt%:%ss%
pause
goto continue

:ymd
rem you have yyyy-MM-dd  this is the format on xp02  (this is the Canada format 
->> YMD) Best for sorting
rem get the date into yy mm dd
FOR /F "TOKENS=1-3 DELIMS=-" %%a IN ("%date%") DO SET yy=%%a&SET mm=%%b&SET 
dd=%%c
rem get the time into hh tt ss
FOR /F "TOKENS=1-3 DELIMS=:." %%a IN ("%time%") DO SET hh=%%a&SET tt=%%b&SET 
ss=%%c

rem Today's date is: %yy%_%mm%_%dd%
rem The time is: %hh%:%tt%:%ss%
pause
goto continue

:continue
rem Now the date is in a good sort format to be used in file/folder names

call F_DailyHandyBackup.bat %yy%_%mm%_%dd%

PAUSE



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to