回复 2# DAIC
非常感谢,查了好多资料才明白基本的意思了,但是有一点不明白,为什么for语句前面要有括号呢,没括号执行起来就不对。
还有一个就是,可以帮忙看下我这个怎么简化一下吗?因为我只会用一条一条输出,就像下面用了4个>>thermalchemical.txt ,可以简化成一个吗,像你上面弄的那样。找完了再输出。- @echo off
- echo.
- echo 命令正在执行......
- set /a sum=0
- for /l %%n in (1,1,50) do (
- if exist %%n.log (
- find "Sum of electronic and zero-point Energies" %%n.log >>thermalchemistry.txt
- find "Sum of electronic and thermal Energies" %%n.log >>thermalchemistry.txt
- find "Sum of electronic and thermal Enthalpies" %%n.log >>thermalchemistry.txt
- find "Sum of electronic and thermal Free Energies" %%n.log >>thermalchemistry.txt
- set /a sum=sum+1
- )
- )
复制代码
|