Why does this script work perfectly on 2K and XP but not on NT 4.0?
Script:
set Day=%Date:~0,2%
set Mth=%Date:~3,2%
set Yr=%Date:~6,4%
ren d:\hamcount\arc_bu.zip arc_bu%Day%-%Mth%-%Yr%.zip
ren d:\hamcount\guardware_bu.zip guardware_bu%Day%-%Mth%-%Yr%.zip
ren d:\hamcount\master_bu.zip master_bu%Day%-%Mth%-%Yr%.zip
ren d:\hamcount\carriers.txt carriers%Day%-%Mth%-%Yr%.txt
move /Y d:\hamcount\*.* d:\hamcount\archive
ERRORS:
C:\>hammove1.bat
C:\>set Day=:~0,2
C:\>set Mth=:~3,2
C:\>set Yr=:~6,4
C:\>ren c:\hamcount\arc_bu.zip arc_bu:~0,2-:~3,2-:~5,4.zip
The syntax of the command is incorrect.
C:\>ren c:\hamcount\guardware_bu.zip guardware_bu:~0,2-:~3,2-:~5,4.zip
The syntax of the command is incorrect.
C:\>ren c:\hamcount\master_bu.zip master_bu:~0,2-:~3,2-:~5,4.zip
The syntax of the command is incorrect.
C:\>ren c:\hamcount\carriers.txt carriers:~0,2-:~3,2-:~5,4.txt
The syntax of the command is incorrect.
C:\>move /Y c:\hamcount\*.* c:\hamcount\archive
The syntax of the command is incorrect.
C:\>
Script:
set Day=%Date:~0,2%
set Mth=%Date:~3,2%
set Yr=%Date:~6,4%
ren d:\hamcount\arc_bu.zip arc_bu%Day%-%Mth%-%Yr%.zip
ren d:\hamcount\guardware_bu.zip guardware_bu%Day%-%Mth%-%Yr%.zip
ren d:\hamcount\master_bu.zip master_bu%Day%-%Mth%-%Yr%.zip
ren d:\hamcount\carriers.txt carriers%Day%-%Mth%-%Yr%.txt
move /Y d:\hamcount\*.* d:\hamcount\archive
ERRORS:
C:\>hammove1.bat
C:\>set Day=:~0,2
C:\>set Mth=:~3,2
C:\>set Yr=:~6,4
C:\>ren c:\hamcount\arc_bu.zip arc_bu:~0,2-:~3,2-:~5,4.zip
The syntax of the command is incorrect.
C:\>ren c:\hamcount\guardware_bu.zip guardware_bu:~0,2-:~3,2-:~5,4.zip
The syntax of the command is incorrect.
C:\>ren c:\hamcount\master_bu.zip master_bu:~0,2-:~3,2-:~5,4.zip
The syntax of the command is incorrect.
C:\>ren c:\hamcount\carriers.txt carriers:~0,2-:~3,2-:~5,4.txt
The syntax of the command is incorrect.
C:\>move /Y c:\hamcount\*.* c:\hamcount\archive
The syntax of the command is incorrect.
C:\>