batch file - GOTO was unexpected at this time -
we trying run custom .bat file has worked fine under win98 years, got new server on weekend , win98 virtual machine not work apparently. so, i'm trying set it'll work through winxp command prompt. need change make work xp?
i type in .bat file , runs fine. allows me type in date, when type in date , hit enter, "goto unexpected @ time":
:crlist.bat - daily c/r deposit list : @echo off call search crdate.exe if exist depos.ls del depos.ls cashlist.exe call qpr depos.ls 2
i found goto in qpr.bat file. here's code qpr.bat:
:qpr.bat - copy specified listing file ( .ls) specified printer port (1-9) : ff foll'g - lptx must captured desired printer : @echo off if "%1==" goto operr if "%2==" goto operr copy %1 lpt%2 call ff%2 goto end :operr echo please re-enter print queue command follows: echo qpr xxxxx.ls n echo. echo xxxxx.ls name of report listing file, echo , n network printer no. on print. :end
i've been reading different threads , i've tried changing "%1=="
"%1"==""
, same %2
, , it'll give me new message saying:
the system cannot find specified file.
0 file(s) copied.
system cannot find specified file.
0 files(s) copied.
if add "%%1"==""
, "%%2"==""
, , add % anywhere there single one, it'll display:
the system cannot find specified file.
system cannot find specified file.
0 files(s) copied.
do need provide code else? there lot of .bat files if can figured out, can apply rest of commands.
you might try this:
@echo off if "%~2"=="" goto operr copy "%~1" lpt%~2:
Comments
Post a Comment