![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-02 21:37 |
共 48,038 主题排行 / 350,123 发帖 / 今日 1 篇 / 48,251 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » 如何设定批处理的工作目录 |
| 可打印版本 753 / 2 |
| 第1楼 kingshui | 发表于 2006-12-29 06:18 |
| 初级用户 发帖 20 积分 153 | |
|
如何设定批处理的工作目录 请问一下..
如何在批处理里面设定批处理里命令的工作目录呢? 例如: 我的批处理在J:\DOC下面 但是我运行的时候要他工作的目录是在%systemroot%这个系统变量的目录.. 应该怎么设置呢? 如下面的: del /f /q %SystemRoot%\system32\mshearts.exe del /f /q %SystemRoot%\system32\freecell.exe del /f /q %SystemRoot%\system32\winmine.exe del /f /q %SystemRoot%\system32\spider.exe del /f /q %SystemRoot%\system32\sol.exe del /f /q %systemroot%\temp\ rd /s /q "%ALLUSERSPROFILE%\「开始」菜单\程序\游戏" rd /s /q %TEMP%\ rd /s /q %TMP%\ md %TEMP% del /f /q %systemroot%\*.log *.txt del /f /q %systemroot%\Prefetch\ dir /a /b $*>updata.txt for /f %%j in (updata.dat) do rd /s /q "%%j" del /f /q updata.txt [ Last edited by kingshui on 2006-12-29 at 06:21 AM ] |
|
| 第2楼 namejm | 发表于 2006-12-29 06:20 |
| 荣誉版主 发帖 1,737 积分 5,226 来自 成都 | |
|
用 cd /d 来跳转。
|
|
| 第3楼 kingshui | 发表于 2006-12-29 06:26 |
| 初级用户 发帖 20 积分 153 | |
|
thanku
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |