- @echo off
- echo starttime,%time%
- echo starttime,%time%>timeresult.txt
- for /r %%i in (*.txt) do (
- echo %%~nxi
-
- call set t1=%%time%%
-
- echo waiting 3 second ...
- ping -n 3 127.1>nul
-
- call set t2=%%time%%
-
- call echo %%t1%%,%%t2%%
- call echo %%~nxi,%%t1%%,%%t2%%>>timeresult.txt
- )
- echo endtime,%time%>>timeresult.txt
- echo endtime,%time%
- echo complete
复制代码 set t1, set t2 前不加call也试过了。
谢谢指点! |