I'm trying to backup some files every night using the DOS console with pkzip under Win2k/XP. I'd like to automatically generate zip file names using the date. Is this feasible using simple DOS scripting?
Here is one of my ideas so far. The DOS command "date /t" outputs "Wed 02/20/2002".
I'd like to store this output in a variable, concatenate my own string to
it, then use it as an argument in pkzip. The following is the pseudocode:
VARIABLE = output of "date /t" // should store "Wed 02/20/2002"
VARIABLE = VARIABLE + "Database" // should store "Wed 02/20/2002Database"
pkzip25.exe -add -nofix -recurse -path=relative c:\shine\backup\VARIABLE
n:\database\*.*
// should create "Wed 02/20/2002Database.zip" in location c:\shine\backup\.
Is this even remotely possible in DOS scripting?
Here is one of my ideas so far. The DOS command "date /t" outputs "Wed 02/20/2002".
I'd like to store this output in a variable, concatenate my own string to
it, then use it as an argument in pkzip. The following is the pseudocode:
VARIABLE = output of "date /t" // should store "Wed 02/20/2002"
VARIABLE = VARIABLE + "Database" // should store "Wed 02/20/2002Database"
pkzip25.exe -add -nofix -recurse -path=relative c:\shine\backup\VARIABLE
n:\database\*.*
// should create "Wed 02/20/2002Database.zip" in location c:\shine\backup\.
Is this even remotely possible in DOS scripting?