for /f "delims=" %%a in ('dir/b/a-d "%root%\*.log"') do (
set "str=%%~nxa"
set "str=!str:~0,6!"
if !str! leq %yy% (del/q "%root%\%%~nxa") else (
if not exist "%root%\!str!\" md "%root%\!str!"
move "%root%\%%~nxa" "%root%\!str!"
)
)
在以上这段指令里面,意思是查找目录下的log文件,然后进行处理
现在的问题是,如果没有找到文件,也就是log文件不存在,会提示:
D:\batch>delFile
File Not Found
Press any key to continue . . .
我想将提示信息“File Not Found”屏蔽掉,使他不输出,应该怎么办?
谢谢
[ Last edited by easonL on 2008-5-26 at 02:22 PM ]作者: tao0610 时间: 2008-5-26 13:48 2>nul作者: easonL 时间: 2008-5-26 13:58
Quote:
Originally posted by tao0610 at 2008-5-26 01:48 PM:
2>nul