|
哑巴
初级用户
  老大不小
积分 270
发帖 37
注册 2003-12-31
状态 离线
|
『楼 主』:
请教 高手 一个变量的问题.
使用 LLM 解释/回答一下
我做了一张盘,用dos8系统
A:\ 的目录
2000-06-08 17:00 118,272 IO.SYS
2004-03-18 21:46 206 AUTOEXEC.BAT
2004-03-18 21:15 116 CONFIG.SYS
2004-03-17 22:54 134 nopri.bat
2004-03-18 22:10 2,111 FIXGHO.BAT
1999-10-10 08:01 45,379 SMARTDRV.EXE
2000-06-08 17:00 25,473 MSCDEX.EXE
1997-11-16 10:01 239,333 TW.EXE
2003-04-08 18:34 3,188 FINDCD.EXE
2004-03-17 22:51 125 nocd.bat
2004-03-18 00:37 1,396 FIXPIO.BAT
2002-12-12 18:27 8,666 WBAT.COM
2000-06-08 17:00 64,425 FLASHPT.SYS
2000-06-08 17:00 53,767 EXTRACT.EXE
2000-06-08 17:00 66,300 FDISK.EXE
2000-06-08 17:00 93,442 COMMAND.COM
2000-06-08 17:00 33,191 HIMEM.SYS
2000-06-08 17:00 41,302 OAKCDROM.SYS
2000-06-08 17:00 15,252 ATTRIB.EXE
2000-10-04 18:22 9 MSDOS.SYS
1998-06-19 20:01 6,855 FINDRAMD.EXE
=======config.sys=======
device=oakcdrom.sys /D:mscd001
device=flashpt.sys
files=40
buffers=10
dos=high,umb
stacks=9,256
lastdrive=z
=======autoexec.bat=====
@ECHO OFF
path=a:\;c:\windows;c:\windows\command
SET DIRCMD=/O:N
MSCDEX.EXE /D:mscd001
IF ERRORLEVEL 1 nocd
findcd >nul
IF "%CDROM%"=="C:" NOPRI
set path=%path%;%CDROM%\
smartdrv 2048 1024
fixgho
=======fixpio.bat========
@ECHO OFF
SET PIO=
IF "%CDROM%"=="E:" SET PIO=d:
IF "%CDROM%"=="F:" SET PIO=d:,e:
IF "%CDROM%"=="G:" SET PIO=d:,e:,f:
IF "%CDROM%"=="H:" SET PIO=d:,e:,f:,g:
IF "%CDROM%"=="I:" SET PIO=d:,e:,f:,g:,h:
IF "%CDROM%"=="J:" SET PIO=d:,e:,f:,g:,h:,i:
IF "%CDROM%"=="K:" SET PIO=d:,e:,f:,g:,h:,i:,j:
IF "%CDROM%"=="L:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:
IF "%CDROM%"=="M:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:
IF "%CDROM%"=="N:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:
IF "%CDROM%"=="O:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:
IF "%CDROM%"=="P:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:
IF "%CDROM%"=="Q:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:
IF "%CDROM%"=="R:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:
IF "%CDROM%"=="S:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:
IF "%CDROM%"=="T:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:
IF "%CDROM%"=="U:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:
IF "%CDROM%"=="V:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:
IF "%CDROM%"=="W:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:
IF "%CDROM%"=="X:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:,w:
IF "%CDROM%"=="Y:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:,w:,x:
IF "%CDROM%"=="Z:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:,w:,x:,y:
======nopio=======
@tw /np
@cls
@echo.
@echo.
@echo 错误:找不到可用的硬盘分区。
@echo 请按 连接上硬盘和分区后再用本光盘。
@echo.
@pause
@TW /Q
=====fixgho.bat=========
set wgho=
:fixgho
call fixpio
for %%i in (%PIO%) do if exist %%i%\ghost\system.gho set gho=%%i%
rem 在这里为什么我无法设置gho的值?
if "%gho%"#==# goto nogho
tw /np >nul
cls
goto res
:nogho
WBAT BOX "在您的电脑中找不到系统镜像文件,无法还原系统,是否要自动备份系统?",是,否 #1,32
IF ERRORLEVEL 100 GOTO end
IF ERRORLEVEL 2 goto end
IF ERRORLEVEL 1 goto write
goto end
:res
WBAT BOX "在 %gho% 盘找到一个镜像文件,请选择操作",系统还原,删除还原文件 #1,64
IF ERRORLEVEL 100 GOTO end
IF ERRORLEVEL 2 GOTO delgho
IF ERRORLEVEL 1 GOTO ress
goto end
:del gho
attrib -s -h -r %gho%\ghost\system.gho
del %gho%\ghost\system.gho
tw /q
fixgho
:ress
echo.
echo.
echo 警告:C: 盘上的数据将被完全
echo 删除并还原到上次备份的状态
echo 请确定您已经备份了 C: 盘上
echo 的重要数据才进行此操作
echo 确定还原请按任意键
echo 按 Ctrl+C 键取消此操作
echo.
echo.
pause >nul
echo %CDROM%:\GHOST\ghost -clone,mode=pload,src=%gho%\ghost\system.gho:1,dst=1:1 -sure -rb
goto end
:write
if "%CDROM%"=="D:" GOTO nodr
WBAT BOX "请选择要保存 C 盘系统镜像的盘符",%PIO%,取消 #1,64
IF ERRORLEVEL 100 GOTO end
IF ERRORLEVEL 23 set wgho=Y:
IF ERRORLEVEL 22 set wgho=X:
IF ERRORLEVEL 21 set wgho=W:
IF ERRORLEVEL 20 set wgho=V:
IF ERRORLEVEL 19 set wgho=U:
IF ERRORLEVEL 18 set wgho=T:
IF ERRORLEVEL 17 set wgho=S:
IF ERRORLEVEL 16 set wgho=R:
IF ERRORLEVEL 15 set wgho=Q:
IF ERRORLEVEL 14 set wgho=P:
IF ERRORLEVEL 13 set wgho=O:
IF ERRORLEVEL 12 set wgho=N:
IF ERRORLEVEL 10 set wgho=M:
IF ERRORLEVEL 9 set wgho=L:
IF ERRORLEVEL 8 set wgho=K:
IF ERRORLEVEL 7 set wgho=J:
IF ERRORLEVEL 6 set wgho=I:
IF ERRORLEVEL 5 set wgho=H:
IF ERRORLEVEL 4 set wgho=G:
IF ERRORLEVEL 3 set wgho=F:
IF ERRORLEVEL 2 set wgho=E:
IF ERRORLEVEL 1 set wgho=D:
if exist %wgho%\ghost\nul md %wgho%\ghost
echo.
echo 这是备份
echo %CDROM%\GHOST\ghost -clone,mode=pdump,src=1:1,dst=%wgho%\ghost\system.gho -sure -rb
goto end
:nodr
cls
echo.
echo.
echo 你的电脑只有一个DOS分区,无法备份系统!
echo.
echo.
pause
goto end
:end
tw /q >nul
@echo on
=====================
问题是上面的红字,请高手帮忙!!!
I made a disk using DOS 8 system
Directory of A:\
2000-06-08 17:00 118,272 IO.SYS
2004-03-18 21:46 206 AUTOEXEC.BAT
2004-03-18 21:15 116 CONFIG.SYS
2004-03-17 22:54 134 nopri.bat
2004-03-18 22:10 2,111 FIXGHO.BAT
1999-10-10 08:01 45,379 SMARTDRV.EXE
2000-06-08 17:00 25,473 MSCDEX.EXE
1997-11-16 10:01 239,333 TW.EXE
2003-04-08 18:34 3,188 FINDCD.EXE
2004-03-17 22:51 125 nocd.bat
2004-03-18 00:37 1,396 FIXPIO.BAT
2002-12-12 18:27 8,666 WBAT.COM
2000-06-08 17:00 64,425 FLASHPT.SYS
2000-06-08 17:00 53,767 EXTRACT.EXE
2000-06-08 17:00 66,300 FDISK.EXE
2000-06-08 17:00 93,442 COMMAND.COM
2000-06-08 17:00 33,191 HIMEM.SYS
2000-06-08 17:00 41,302 OAKCDROM.SYS
2000-06-08 17:00 15,252 ATTRIB.EXE
2000-10-04 18:22 9 MSDOS.SYS
1998-06-19 20:01 6,855 FINDRAMD.EXE
=======config.sys=======
device=oakcdrom.sys /D:mscd001
device=flashpt.sys
files=40
buffers=10
dos=high,umb
stacks=9,256
lastdrive=z
=======autoexec.bat=====
@ECHO OFF
path=a:\;c:\windows;c:\windows\command
SET DIRCMD=/O:N
MSCDEX.EXE /D:mscd001
IF ERRORLEVEL 1 nocd
findcd >nul
IF "%CDROM%"=="C:" NOPRI
set path=%path%;%CDROM%\
smartdrv 2048 1024
fixgho
=======fixpio.bat========
@ECHO OFF
SET PIO=
IF "%CDROM%"=="E:" SET PIO=d:
IF "%CDROM%"=="F:" SET PIO=d:,e:
IF "%CDROM%"=="G:" SET PIO=d:,e:,f:
IF "%CDROM%"=="H:" SET PIO=d:,e:,f:,g:
IF "%CDROM%"=="I:" SET PIO=d:,e:,f:,g:,h:
IF "%CDROM%"=="J:" SET PIO=d:,e:,f:,g:,h:,i:
IF "%CDROM%"=="K:" SET PIO=d:,e:,f:,g:,h:,i:,j:
IF "%CDROM%"=="L:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:
IF "%CDROM%"=="M:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:
IF "%CDROM%"=="N:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:
IF "%CDROM%"=="O:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:
IF "%CDROM%"=="P:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:
IF "%CDROM%"=="Q:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:
IF "%CDROM%"=="R:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:
IF "%CDROM%"=="S:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:
IF "%CDROM%"=="T:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:
IF "%CDROM%"=="U:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:
IF "%CDROM%"=="V:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:
IF "%CDROM%"=="W:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:
IF "%CDROM%"=="X:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:,w:
IF "%CDROM%"=="Y:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:,w:,x:
IF "%CDROM%"=="Z:" SET PIO=d:,e:,f:,g:,h:,i:,j:,k:,l:,m:,n:,o:,p:,q:,r:,s:,t:,u:,v:,w:,x:,y:
======nopio=======
@tw /np
@cls
@echo.
@echo.
@echo 错误:找不到可用的硬盘分区。
@echo 请按 连接上硬盘和分区后再用本光盘。
@echo.
@pause
@TW /Q
=====fixgho.bat=========
set wgho=
:fixgho
call fixpio
for %%i in (%PIO%) do if exist %%i%\ghost\system.gho set gho=%%i%
Why can't I set the value of gho here?
if "%gho%"#==# goto nogho
tw /np >nul
cls
goto res
:nogho
WBAT BOX "在您的电脑中找不到系统镜像文件,无法还原系统,是否要自动备份系统?",是,否 #1,32
IF ERRORLEVEL 100 GOTO end
IF ERRORLEVEL 2 goto end
IF ERRORLEVEL 1 goto write
goto end
:res
WBAT BOX "在 %gho% 盘找到一个镜像文件,请选择操作",系统还原,删除还原文件 #1,64
IF ERRORLEVEL 100 GOTO end
IF ERRORLEVEL 2 GOTO delgho
IF ERRORLEVEL 1 GOTO ress
goto end
:del gho
attrib -s -h -r %gho%\ghost\system.gho
del %gho%\ghost\system.gho
tw /q
fixgho
:ress
echo.
echo.
echo 警告:C: 盘上的数据将被完全
echo 删除并还原到上次备份的状态
echo 请确定您已经备份了 C: 盘上
echo 的重要数据才进行此操作
echo 确定还原请按任意键
echo 按 Ctrl+C 键取消此操作
echo.
echo.
pause >nul
echo %CDROM%:\GHOST\ghost -clone,mode=pload,src=%gho%\ghost\system.gho:1,dst=1:1 -sure -rb
goto end
:write
if "%CDROM%"=="D:" GOTO nodr
WBAT BOX "请选择要保存 C 盘系统镜像的盘符",%PIO%,取消 #1,64
IF ERRORLEVEL 100 GOTO end
IF ERRORLEVEL 23 set wgho=Y:
IF ERRORLEVEL 22 set wgho=X:
IF ERRORLEVEL 21 set wgho=W:
IF ERRORLEVEL 20 set wgho=V:
IF ERRORLEVEL 19 set wgho=U:
IF ERRORLEVEL 18 set wgho=T:
IF ERRORLEVEL 17 set wgho=S:
IF ERRORLEVEL 16 set wgho=R:
IF ERRORLEVEL 15 set wgho=Q:
IF ERRORLEVEL 14 set wgho=P:
IF ERRORLEVEL 13 set wgho=O:
IF ERRORLEVEL 12 set wgho=N:
IF ERRORLEVEL 10 set wgho=M:
IF ERRORLEVEL 9 set wgho=L:
IF ERRORLEVEL 8 set wgho=K:
IF ERRORLEVEL 7 set wgho=J:
IF ERRORLEVEL 6 set wgho=I:
IF ERRORLEVEL 5 set wgho=F:
IF ERRORLEVEL 2 set wgho=E:
IF ERRORLEVEL 1 set wgho=D:
if exist %wgho%\ghost\nul md %wgho%\ghost
echo.
echo 这是备份
echo %CDROM%\GHOST\ghost -clone,mode=pdump,src=1:1,dst=%wgho%\ghost\system.gho -sure -rb
goto end
:nodr
cls
echo.
echo.
echo 你的电脑只有一个DOS分区,无法备份系统!
echo.
echo.
pause
goto end
:end
tw /q >nul
@echo on
=====================
The problem is the red text above, please help from the expert!!!
|

C:\>给我$100,0000
Bad command or file name |
|
2004-3-18 00:00 |
|
|
aria
高级用户
   
积分 924
发帖 243
注册 2003-7-9
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
呵呵,建议你把OAKCDROM.SYS换成VIDE-CDD.SYS
使用FLASHPT.SYS,难道你想支持特殊光驱吗?
另外,这篇帖子不应该发到这里
Hehe, it is suggested that you replace OAKCDROM.SYS with VIDE-CDD.SYS. Using FLASHPT.SYS, do you want to support special CD-ROM drives?
In addition, this post should not be posted here
|
|
2004-3-19 00:00 |
|
|
哑巴
初级用户
  老大不小
积分 270
发帖 37
注册 2003-12-31
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
多谢aria赐教,
我是问盘中的fixgho.bat中为什么我无法设置gho变量的值?
回显是
if exist %PIO% <-这个PIO值是正确的。
请各位大侠帮我。
Thanks for the advice from aria,
I am asking why I can't set the value of the gho variable in the fixgho.bat in the disk.
The echo is
if exist %PIO% <-This PIO value is correct.
Please help, great experts.
|

C:\>给我$100,0000
Bad command or file name |
|
2004-3-19 00:00 |
|
|
哑巴
初级用户
  老大不小
积分 270
发帖 37
注册 2003-12-31
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
请高手看看!!!!
Please高手 take a look!!!
|

C:\>给我$100,0000
Bad command or file name |
|
2004-3-25 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
你的批处理中的for循环变量使用方式有问题。我感觉应该写成这样:
for %%i in (%PIO%) do if exist %%i\ghost\system.gho set gho=%%i
rem 在这里为什么我无法设置gho的值?
if "%gho%"=="" goto nogho
The way you use the for loop variable in your batch processing is problematic. I think it should be written like this:
for %%i in (%PIO%) do if exist %%i\ghost\system.gho set gho=%%i
rem Why can't I set the value of gho here?
if "%gho%"=="" goto nogho
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2004-3-26 00:00 |
|
|
哑巴
初级用户
  老大不小
积分 270
发帖 37
注册 2003-12-31
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
把for %%i in (%PIO%) do if exist %%i%\ghost\system.gho set gho=%%i%
写成for %%i in (%PIO%) do if exist %%i\ghost\system.gho set gho=%%i
可Dos会提示语法错误。
Write "把for %%i in (%PIO%) do if exist %%i%\ghost\system.gho set gho=%%i%写成for %%i in (%PIO%) do if exist %%i\ghost\system.gho set gho=%%i可Dos会提示语法错误。" as "Write "for %%i in (%PIO%) do if exist %%i%\ghost\system.gho set gho=%%i% " as "for %%i in (%PIO%) do if exist %%i\ghost\system.gho set gho=%%i" and DOS will prompt a syntax error."
|

C:\>给我$100,0000
Bad command or file name |
|
2004-3-30 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
是不是你的DOS 8有问题,这是我在Win2003的DOS窗口单步执行的命令结果:
D:\>set PIO=c:,d:,e:,f:
D:\>for %i in (%PIO%) do if exist %i\ghost\system.gho set gho=%i
D:\>if exist c:\ghost\system.gho set gho=c:
D:\>if exist d:\ghost\system.gho set gho=d:
D:\>if exist e:\ghost\system.gho set gho=e:
D:\>if exist f:\ghost\system.gho set gho=f:
从结果看,没有什么问题呀
Is there a problem with your DOS 8? This is the result of the command executed step by step in the DOS window of Win2003:
D:\>set PIO=c:,d:,e:,f:
D:\>for %i in (%PIO%) do if exist %i\ghost\system.gho set gho=%i
D:\>if exist c:\ghost\system.gho set gho=c:
D:\>if exist d:\ghost\system.gho set gho=d:
D:\>if exist e:\ghost\system.gho set gho=e:
D:\>if exist f:\ghost\system.gho set gho=f:
From the result, there is no problem.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2004-3-31 00:00 |
|
|
哑巴
初级用户
  老大不小
积分 270
发帖 37
注册 2003-12-31
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
2003和XP好象是可以,但换成DOS8.0和DOS7.1都无法传递%PIO%的值。
这是为何???????
2003 and XP seem to be okay, but when replacing with DOS 8.0 and DOS 7.1, the value of %PIO% cannot be passed. Why is this???????
|

C:\>给我$100,0000
Bad command or file name |
|
2004-4-11 00:00 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
Re 哑巴:
如果想在DOS7/8版本下运行正常,请将%PIO%值中的盘符分隔符改为分号,也可以是等号或者空格,但不能是逗号,否则for命令无法分离出单独的驱动器盘符。
Re Yaba:
If you want to run normally under DOS 7/8 versions, change the drive separator in the %PIO% value to a semicolon, or it can also be an equal sign or a space, but not a comma, otherwise the for command cannot separate the individual drive letters.
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2004-4-13 00:00 |
|
|
哑巴
初级用户
  老大不小
积分 270
发帖 37
注册 2003-12-31
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
willsort 是个好同志,我为什么没有注意到这点!
98启动盘的%LglDrv%就是个好例子,
我记得DOS622好象只能用逗号,太久没用给忘了。
willsort is a good comrade, why didn't I notice this!
The %LglDrv% in the 98 startup disk is a good example,
I remember that DOS622 seems to only use commas, I forgot after not using it for too long.
|

C:\>给我$100,0000
Bad command or file name |
|
2004-4-13 00:00 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
Re 哑巴:
在DOS的一系列版本中,除了NT平台下的虚拟DOS控制台之外,其他所有的版本,都支持三种命令参数分隔符,那就是分号、等号和空格。
命令行中较常使用的是空格,FOR语句中的循环集中较常使用的是分号,而在内部命令PATH中较常使用的是等号。除了极个别的场合之外,基本上所有的内部命令都兼容三种参数分隔符,也就是说,在内部命令的使用中,可以用空格的地方,也可以使用等号和分号,效果是等同的。
其中的原因是,作为内部命令的统一管理者command.com处理参数分隔的情况时,为了简单的支持各种场合的使用,而将他们一律作成通用分隔符处理。当然,在外部命令中,使用了自身的参数分隔识别机制,因而没有空格以外多余的分隔符;而在某些内部命令(如set)中,对等号和分号可能有特殊的解释,属于特殊例外。
Re Y哑巴:
Among a series of versions of DOS, except for the virtual DOS console under the NT platform, all other versions support three command parameter separators, namely semicolons, equals signs, and spaces.
Spaces are more commonly used in command lines, semicolons are more commonly used in loop concentration in FOR statements, and equals signs are more commonly used in the internal command PATH. Except for extremely rare occasions, basically all internal commands are compatible with the three parameter separators, that is, in the use of internal commands, where spaces can be used, equals signs and semicolons can also be used, and the effects are equivalent.
The reason is that when command.com, as the unified manager of internal commands, handles the situation of parameter separation, in order to simply support the use in various occasions, it uniformly treats them as general separators. Of course, in external commands, their own parameter separation recognition mechanism is used, so there are no redundant separators other than spaces; and in some internal commands (such as set), equals signs and semicolons may have special interpretations, which are special exceptions.
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2004-4-14 00:00 |
|
|
哑巴
初级用户
  老大不小
积分 270
发帖 37
注册 2003-12-31
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
这个好理解,谢了,我目前还有一点小问题没有搞定。
This is easy to understand, thanks. I still have a small problem that hasn't been solved yet.
|

C:\>给我$100,0000
Bad command or file name |
|
2004-4-19 00:00 |
|
|