运行COPY后,我想用返回码看是否空间不足,XCOPY好象是4,但COPY后,不管空间是否足,好象都是26,(加载了TW32,DOSLFN)
@echo off
xmsdsk 1000 z: /t /y
copy d:\game\wolf3d z:\ /y >nul
if errorlevel 27 goto 27
if errorlevel 26 goto 26
if errorlevel 5 goto other
if errorlevel 4 goto noenough
if errorlevel 3 goto 3
if errorlevel 2 goto ctrl
if errorlevel 1 goto nofile
if errorlevel 0 goto ok
:27
wbat box error27
goto end
:26
wbat box error26
goto end
<img src="images/smilies/face-surprise.png" align="absmiddle" border="0">ther
wbat box othererror
goto end
:noenough
wbat box noenough
goto end
:3
wbat box errorlevel3
goto end
:ctrl
wbat box ctrlc
goto end
:nofile
wbat box nofile
goto end
:end
set copy=fail
<img src="images/smilies/face-surprise.png" align="absmiddle" border="0">k
最后显示ERROR26
而且,空间不足运行COPY XXXX XXXX >FILE, 或管道 | FIND /I "Insufficient disk space"
> 和| 都无效! 就是不能把这个Insufficient disk space截取下来,但他确实显示了.
XCOPY就正常.