» 
batch file on win xp
Hi there,
Currently, I have a batch file for running a simple backup. The backup directory is set using the name of the directory being backed up plus the current date -
set dd=%date:~0,2%
set mm=%date:~3,2%
set yyyy=%date:~6,4%
set backupdir=c:\tempBAK%yyyy%%mm%%dd%
I need to modify the script so it checks to see if the directory already exists, and if so, it should append "-1" to the backupdir.
It then needs to check again to see if this new backupdir already exists, if so it should change the appended "-1" to "-2", and so on.
I have tried a few things but not making any real progress, and would very much appreciate any help anyone can give.
TIA
nick
Last edited by nnichols; 09-24-2003 at 07:50 AM.
|