开发者

How to delete files in multiple unknown folders from a single bat file?

Suppose I don't know names of all the folders in a directory. I want to delete all the .exe file in those folders fr开发者_运维问答om a single bat file. What will be the command? Is it possible?

cd ?
del *.exe 


Try to do

del /s *.exe

/S stands for delete from all Subfolders (DELTREE)


Using FOR to iterate over directories:

for /d %i in (*.*) do del %i\*.exe
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜