Board logo

标题: [求助]运行带参数的exe [打印本页]

作者: xiaopeng018     时间: 2008-8-25 15:17    标题: [求助]运行带参数的exe

思路:
1、全盘查找1.exe文件
2、运行 1.exe -i

小弟刚学这个 请各位指点下
作者: pusofalse     时间: 2008-8-25 15:32

@echo off
for /f "delims=驱动器:\" %%a in ('fsutil fsinfo drives^|more') do (
       cd /d %%a:\
       for /r %%i in (1.exe) do if exist "%%i" start %%~fsi -i
)
echo.&pause
[ Last edited by pusofalse on 2008-8-25 at 03:36 PM ]
作者: xiaopeng018     时间: 2008-8-25 15:47
多谢指点 仔细研究下 全盘查找的话 怎么不是find呢?

[ Last edited by xiaopeng018 on 2008-8-25 at 03:48 PM ]
作者: pusofalse     时间: 2008-8-25 15:50
find?它只是查找字符串的。搜索文件可以用dir。
个人习惯而已,喜欢用for的/r参数及if exist来查找。
作者: xiaopeng018     时间: 2008-8-25 15:55
好的 多谢