B
+Bob+
Guest
I need to set up a bat file that will use xcopy to copy a directory
from one drive to another. The resulting directory needs to
incorporate the date that it is copied into the name. Something like
this:
xcopy c:\bigdir\*.*/s/e d:\bigdir-10-oct-2008\*.*
I need to do this on a regular basis, so how can I pull the date
within the bat file into a variable?
Also, assuming I can get the date into a variable named something like
"DateIn" will a command like this work:
xcopy c:\bigdir\*.*/s/e d:\bigdir-%DateIn%\*.*
Thanks,
from one drive to another. The resulting directory needs to
incorporate the date that it is copied into the name. Something like
this:
xcopy c:\bigdir\*.*/s/e d:\bigdir-10-oct-2008\*.*
I need to do this on a regular basis, so how can I pull the date
within the bat file into a variable?
Also, assuming I can get the date into a variable named something like
"DateIn" will a command like this work:
xcopy c:\bigdir\*.*/s/e d:\bigdir-%DateIn%\*.*
Thanks,