回复 22# qixiaobin0715
为什么第一个不可以执行,第二个可以能执行,我感觉效果一样呢- 代码1
- @echo on
- echo 按任意键开始计算~
-
- pause>nul
-
- PATH=%PATH%;"C:\Program Files (x86)\GEO-SLOPE\GeoStudio 9\Bin"
- for /f "delims=" %%i in ('dir /b /s /ad ') do (
- findstr "%%~fi\SLOPE&3W Analysis" || echo "%%~fi\%%~nxi.xml"
- )
- echo 计算完成
- echo 按任意键退出
- pause>nul
-
- ------------------------------------------------
- 代码2
- @echo off
- echo 按任意键开始计算~
-
- pause>nul
-
- PATH="C:\Program Files (x86)\GEO-SLOPE\GeoStudio 9\Bin";%PATH%
-
- for /f "delims=" %%i in ('dir /b /s /ad ') do (
- if not exist "%%~fi\SLOPE&3W Analysis" (
- if exist "%%~fi\%%~nxi.xml" (
- echo "%%~fi\%%~nxi.xml"
- )
- )
- )
- echo 计算完成
- echo 按任意键退出
- pause>nul
复制代码
|