我的批处理文件有问题我已经写好了。该文件在各种Win7机器上都能正常工作,但是在我们剩下的几台WinXP机器上,当我到达" CALLING"另一个批处理文件,标题为" VBS"。 VBS是一个正常运行的数学批处理文件。奇怪的是,如果我创建一个单独的批处理文件并尝试在WinXP上调用VBS(5 + 5 + 5),它将返回15的正确答案。
WinXP是否不喜欢数学方程中的变量?我已逐步完成了流程的每个部分,以确保每个变量都得到满足,并且确实如此。
有人有什么想法吗?
我没有发布该程序的整个代码,因为它超过18,000行,但这是给我带来麻烦的部分,这是代码的开头。
谢谢。
identify -verbose %1 >%1.txt
:CREATE_DIR
if exist "\\celsus\customer artwork\New Artwork\%group%\%new_name%\" (
GOTO :ADVANCED_METRICS
) ELSE (
mkdir "\\celsus\customer artwork\New Artwork\%group%\%new_name%\"
copy "File Processing.bat" "\\celsus\customer artwork\New Artwork\%group%\%new_name%\"
copy "Create Report.bat" "\\celsus\customer artwork\New Artwork\%group%\%new_name%\"
goto ADVANCED_METRICS
)
:ADVANCED_METRICS
FINDSTR "\<Format:" %1.txt >Format.txt
for /f "tokens=2" %%A in (
Format.txt
) do set Format=%%A
FINDSTR "\<Geometry:" %1.txt >Geometry.txt
for /f "tokens=2 delims=+ " %%A in (
Geometry.txt
) do set Geometry=%%A
FINDSTR "\<Print size:" %1.txt >pSize.txt
for /f "tokens=3" %%A in (
pSize.txt
) do set pSize=%%A
FINDSTR "x" pSize.txt >pSizeW.txt
for /f "tokens=3 delims=x " %%A in (
pSizeW.txt
) do set Width=%%A
FINDSTR "\<Print size:" %1.txt >pSize.txt
for /f "tokens=2 delims=x" %%A in (
pSize.txt
) do set Height=%%A
FINDSTR "\<Resolution:" %1.txt >Resolution.txt
for /f "tokens=2 delims=x" %%A in (
Resolution.txt
) do set Resolution=%%A
FINDSTR "\<Colorspace:" %1.txt >Colorspace.txt
for /f "tokens=2" %%A in (
Colorspace.txt
) do set Colorspace=%%A
del %1.txt
del Format.txt
del Geometry.txt
del pSize.txt
del pSizeW.txt
del Resolution.txt
del Colorspace.txt
call vbs ((%Resolution%/300)*%Width%)
set nWidth300=%val%
call vbs ((%Resolution%/600)*%Width%)
set nWidth600=%val%
call vbs ((%Resolution%/300)*%Height%)
set nHeight300=%val%
call vbs ((%Resolution%/600)*%Height%)
set nHeight600=%val%