可以不用第三行代码- for /f "tokens=*" %%a in ('dir x.x /-c ^|find " 字节" ^|find /v ":"') do (
复制代码 中的复制代码
不知道这句有什么作用?
修改楼主代码:
- @echo off
- echo i like the bathome,because here is the batch of the world.>x.x
- for /f "tokens=*" %%i in ('dir x.x /-c^|find " 字节"') do (
- for /f "tokens=3" %%j in ('echo %%i') do (
- set /a len=%%j-2&call,echo %%len%%&del x.x /q
- ))&pause
复制代码
请指正!
[ 本帖最后由 keen 于 2009-5-11 23:11 编辑 ] |