![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread
Number : 1114 Date : 2001-12-05 Author : Garry Deane Subject : Re: My backup routine Size(KB) : 0
It's not essential to use xxcopy's macro to create the directory name. If you're using NT or later, the following will extract the month & day from the date/t command. for /f "tokens=1-4 delims=/ " %%a in ('date /t') do set date=%%b-%%c You would then use %date% instead of /$MON-DD$ as in xxcopy c:\* c:\bak\%date% \ /s /M /Xc:\mp3s\*\* /CCY /IA /oAc:\bupdaily.log Note that this generates a date like 12-05 instead of DEC-05 and depends on your regional date format being mm-dd-yy. You can adjust the 'set date=' command to handle different date formats. If really needed, you could also map the numeric month to a text month value. If you're using W9x or instead of using 'date /t', you can use a utility program like STRINGS or similar to extract a date in the desired format and place it in an environment variable.
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.