![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-11 10:26 |
共 47,811 主题排行 / 349,897 发帖 / 今日 0 篇 / 48,256 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » 求助:解读批处理文件 |
| 可打印版本 694 / 3 |
| 第1楼 niupidemicky | 发表于 2009-02-16 12:56 |
| 贫困用户 发帖 1 积分 -1 | |
|
求助:解读批处理文件 本人菜鸟呵,各位前辈请帮忙解读一下下面程序各行的意义。谢谢。
@echo off PROMPT $P$G CWSDPMI -X lh c:\smartdrv.exe 1024 1024 d: c:\pnc > nul del nul nskm if errorlevel 1 goto Reboot if errorlevel 0 goto Exit :Reboot reboot :Exit |
|
| 第2楼 zhengqian529 | 发表于 2009-02-16 14:46 |
| 初级用户 发帖 93 积分 100 来自 湖南 | |
|
看下基本的几个DOS命令就知道了:echo, prompt, lh, del, if, nskm, reboot.
|
|
| 第3楼 zhengqian529 | 发表于 2009-02-16 14:54 |
| 初级用户 发帖 93 积分 100 来自 湖南 | |
|
@echo off (其后的命令不显示)
PROMPT $P$G (以当前路径和>符号作为命令行提示符) CWSDPMI -X (http://www.cn-dos.net/forum/viewthread.php?tid=17903) lh c:\smartdrv.exe 1024 1024 (将程序放入高端内存) d: (转到D盘) c:\pnc > nul del nul (删除文件夹下的文件) nskm (不知道这个是什么) if errorlevel 1 goto Reboot (如果 errorlevel==1,转到reboot label) if errorlevel 0 goto Exit (如果 errorlevel==0,转到exit label) :Reboot reboot (重新启动命令) :Exit |
|
| 第4楼 tireless | 发表于 2009-02-16 16:00 |
| 银牌会员 发帖 1,122 积分 2,025 | |
|
这个解释有误:
if errorlevel 1 goto Reboot (如果 errorlevel==1,转到reboot label) 应该是: if errorlevel 1 goto Reboot (如果 errorlevel 大于等于 1,转到reboot label) if errorlevel 0 goto Exit (如果 errorleve 大于等于 0,转到exit label) |
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |