How to remove all folders of name x within a directory using cmd/batch file

后端 未结 4 582
忘了有多久
忘了有多久 2021-02-15 06:04

I have a folder named x with a number of subfolders and files. I want to delete a folder named y that is present in x and all of it\'s subfolders. The said folder that has to be

4条回答
  •  孤独总比滥情好
    2021-02-15 06:40

    Make .bat with following:

    del /q "C:\Users\XXX\AppData\Local\Temp\*"
    
    FOR /D %%p IN ("C:\Users\XXX\AppData\Local\Temp\*.*") DO rmdir "%%p" /s /q
    

提交回复
热议问题