- Jun 25, 2001
- 29
- 0
- 0
ok Here is the cituation. I had this .bat file that I used to zip up some file and automotically add the date to the end of the file name:
example:
backup 01-20-2000.zip
backup 01-21-2000.zip
backup 01-22.2000.zip
etc......
It works great under windows98 but when I tried it under XP it gave several errors.
Here is the Bat file info:
-----------------------------------------
:: gdate.bat (GetDATE)
@ECHO off
SET gdate1=
ECHO SET date=%%3>%temp%.\%%gdate1%%.bat
DIR/A-D/-W/L/-P %temp% | FIND "%%gdate1%%" >%temp%.\%%gdate2%%.bat
SET gdate1=%temp%.\%%gdate1%%
CALL %temp%.\%%gdate2%%.bat
SET gdate1=
DEL %temp%.\%%gdate?%%.bat
pkzip "c:\temp\backup %date%.zip" c:\backup\*.*
_________________________________________________
When I try it in XP I get the error : can't create "backup 1/20/2000.zip"
Is this a Pkzip vs. XP error ?
or
a "/" character problem with XP?
________
There was another error but when I retried the problem today it never came up and I didn't right it down.
It had to do with the formula:
Example:
%%gdate1.%% is longer then 8 characters so I had change the formula to %%g1%% to make it work.
Another XP problem???
I also had the problem when I wanted to use pkzip to zip into a file called: Verylongfilename.zip it auto-truncated it to Verylong.zip
example:
backup 01-20-2000.zip
backup 01-21-2000.zip
backup 01-22.2000.zip
etc......
It works great under windows98 but when I tried it under XP it gave several errors.
Here is the Bat file info:
-----------------------------------------
:: gdate.bat (GetDATE)
@ECHO off
SET gdate1=
ECHO SET date=%%3>%temp%.\%%gdate1%%.bat
DIR/A-D/-W/L/-P %temp% | FIND "%%gdate1%%" >%temp%.\%%gdate2%%.bat
SET gdate1=%temp%.\%%gdate1%%
CALL %temp%.\%%gdate2%%.bat
SET gdate1=
DEL %temp%.\%%gdate?%%.bat
pkzip "c:\temp\backup %date%.zip" c:\backup\*.*
_________________________________________________
When I try it in XP I get the error : can't create "backup 1/20/2000.zip"
Is this a Pkzip vs. XP error ?
or
a "/" character problem with XP?
________
There was another error but when I retried the problem today it never came up and I didn't right it down.
It had to do with the formula:
Example:
%%gdate1.%% is longer then 8 characters so I had change the formula to %%g1%% to make it work.
Another XP problem???
I also had the problem when I wanted to use pkzip to zip into a file called: Verylongfilename.zip it auto-truncated it to Verylong.zip