W
Wowbagger
Guest
Executing this script on a 2003 server results in an error claiming that the
syntax is incorrect. What am I missing here? This script works perfectly
on an XP machine.
-- script begins --
c:
cd "c:\shared\RE Photos"
if not exist thumbs.db GOTO main
attrib -s -h thumbs.db
del thumbs.db
:main
if not exist #Numbered GOTO error_missing_dir
if exist 0*.* move 0*.* #Numbered /Y
if exist 1*.* move 1*.* #Numbered /Y
if exist 2*.* move 2*.* #Numbered /Y
if exist 3*.* move 3*.* #Numbered /Y
if exist 4*.* move 4*.* #Numbered /Y
if exist 5*.* move 5*.* #Numbered /Y
if exist 6*.* move 6*.* #Numbered /Y
if exist 7*.* move 7*.* #Numbered /Y
if exist 8*.* move 8*.* #Numbered /Y
if exist 9*.* move 9*.* #Numbered /Y
if not exist -a GOTO error_missing_dir
if exist a*.* move a*.* -a /Y
if not exist -b GOTO error_missing_dir
if exist b*.* move b*.* -b /Y
if not exist -c GOTO error_missing_dir
if exist c*.* move c*.* -c /Y
if not exist -d-f GOTO error_missing_dir
if exist d*.* move d*.* -d-f /Y
if exist e*.* move e*.* -d-f /Y
if exist f*.* move f*.* -d-f /Y
if not exist -g-i GOTO error_missing_dir
if exist g*.* move g*.* -g-i /Y
if exist h*.* move h*.* -g-i /Y
if exist i*.* move i*.* -g-i /Y
if not exist -j-l GOTO error_missing_dir
if exist j*.* move j*.* -j-l /Y
if exist k*.* move k*.* -j-l /Y
if exist l*.* move l*.* -j-l /Y
if not exist -m-n GOTO error_missing_dir
if exist m*.* move m*.* -m-n /Y
if exist n*.* move n*.* -m-n /Y
if not exist -o-r GOTO error_missing_dir
if exist o*.* move o*.* -o-r /Y
if exist p*.* move p*.* -o-r /Y
if exist q*.* move q*.* -o-r /Y
if exist r*.* move r*.* -o-r /Y
if not exist -s-t GOTO error_missing_dir
if exist s*.* move s*.* -s-t /Y
if exist t*.* move t*.* -s-t /Y
if not exist -u-x GOTO error_missing_dir
if exist u*.* move u*.* -u-x /Y
if exist v*.* move v*.* -u-x /Y
if exist w*.* move w*.* -u-x /Y
if exist x*.* move x*.* -u-x /Y
if not exist -y-z GOTO error_missing_dir
if exist y*.* move y*.* -y-z /Y
if exist z*.* move z*.* -y-z /Y
GOTO END
:error_missing_dir
@echo ERROR! Destination directory missing. Process halted.
:END
syntax is incorrect. What am I missing here? This script works perfectly
on an XP machine.
-- script begins --
c:
cd "c:\shared\RE Photos"
if not exist thumbs.db GOTO main
attrib -s -h thumbs.db
del thumbs.db
:main
if not exist #Numbered GOTO error_missing_dir
if exist 0*.* move 0*.* #Numbered /Y
if exist 1*.* move 1*.* #Numbered /Y
if exist 2*.* move 2*.* #Numbered /Y
if exist 3*.* move 3*.* #Numbered /Y
if exist 4*.* move 4*.* #Numbered /Y
if exist 5*.* move 5*.* #Numbered /Y
if exist 6*.* move 6*.* #Numbered /Y
if exist 7*.* move 7*.* #Numbered /Y
if exist 8*.* move 8*.* #Numbered /Y
if exist 9*.* move 9*.* #Numbered /Y
if not exist -a GOTO error_missing_dir
if exist a*.* move a*.* -a /Y
if not exist -b GOTO error_missing_dir
if exist b*.* move b*.* -b /Y
if not exist -c GOTO error_missing_dir
if exist c*.* move c*.* -c /Y
if not exist -d-f GOTO error_missing_dir
if exist d*.* move d*.* -d-f /Y
if exist e*.* move e*.* -d-f /Y
if exist f*.* move f*.* -d-f /Y
if not exist -g-i GOTO error_missing_dir
if exist g*.* move g*.* -g-i /Y
if exist h*.* move h*.* -g-i /Y
if exist i*.* move i*.* -g-i /Y
if not exist -j-l GOTO error_missing_dir
if exist j*.* move j*.* -j-l /Y
if exist k*.* move k*.* -j-l /Y
if exist l*.* move l*.* -j-l /Y
if not exist -m-n GOTO error_missing_dir
if exist m*.* move m*.* -m-n /Y
if exist n*.* move n*.* -m-n /Y
if not exist -o-r GOTO error_missing_dir
if exist o*.* move o*.* -o-r /Y
if exist p*.* move p*.* -o-r /Y
if exist q*.* move q*.* -o-r /Y
if exist r*.* move r*.* -o-r /Y
if not exist -s-t GOTO error_missing_dir
if exist s*.* move s*.* -s-t /Y
if exist t*.* move t*.* -s-t /Y
if not exist -u-x GOTO error_missing_dir
if exist u*.* move u*.* -u-x /Y
if exist v*.* move v*.* -u-x /Y
if exist w*.* move w*.* -u-x /Y
if exist x*.* move x*.* -u-x /Y
if not exist -y-z GOTO error_missing_dir
if exist y*.* move y*.* -y-z /Y
if exist z*.* move z*.* -y-z /Y
GOTO END
:error_missing_dir
@echo ERROR! Destination directory missing. Process halted.
:END