分析dos下删除所有的exe文件(包含子目录)



dos下删除所有的exe文件,包含子目录
 
删除c:盘 上全部exe 文件。呵呵。不要乱用啊!
 
可以用 dir /b /s /a-d *.exe 配合 awk 自动生成一个脚本,然后运行这个脚本删除*.exe
dir /b /s /a-d c:\*.exe|awk '{print "del "$0}'>delx.bat
call delx.bat  www.2cto.com  
 
也可以 找出全部子目录传递给 awk 生成一个删除这些子目录中包含的exe 文件的脚本,然后调用这个脚本。
dir /b /s /ad c:\|awk '{print "del "$0"\*.exe"}' >delx.bat
call delx.bat
 
 
 
作者 DXSX

相关内容

    暂无相关文章