我这边一个传输文件的脚本一直提示“无效数字。数字常数只能是十进制(17),十六进制(0x11)或八进制(021)”,请各位大佬帮帮忙,看一下那里出错了- @echo off
- set Pan=D:\1\
- set Back=D:\2\
- set DQ=238358
- set YS=238357
- set LogFile=D:\1\
-
- set D=%DATE:~8,2%
- set DD=0
- set DDD=0
- set DDDD=0
- :loop
- ping -n 1 127.0.0.>nul
- set D=%DATE:~8,2%
- set DESFILE=1_%DQ%_1047576955.dbf.zip
- set YSFILE=1_%YS%_1047576955.dbf.zip
- echo %DESFILE%
-
- if %DD% NEQ %D% (
- set /a DD = %D%+0
- set /a DDD= %DDD%+1
- set /a DDDD = %DDD%+0
- set /a DDDD = %DDD%+1
- echo %DDD%
- echo %DDDD%
- echo %DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2% %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% movesoft[]:Create softlog-%DDDD%.log Sussce > %LogFile%softlog-0.log
- echo sesuuce
- ) else (
- echo %DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2% %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% movesoft[]:Create softlog-%DDDD%.log Fail > %LogFile%softlog-1.log
- echo !
- )
-
- if exist "%Pan%%DESFILE%" (
- set /a YS=%YS%+1
- set YSFILE=1_%YS%_1047576955.dbf.tar.bz
- echo %YSFILE%
- move "%Pan%%YSFILE%" "%Back%" > nul
- echo %DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2% %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% movesoft[]:copy "%Pan%%YSFILE%" "%Back%" Sussce >> %LogFile%softlog-%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%.log
- set /a DQ=%DQ%+1
- ) else (
- echo %DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2% %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% movesoft[]:copy "%Pan%%YSFILE%" "%Back%" NotFound > %LogFile%softlog-fail.log
- )
- goto:loop
- pause
复制代码
|