Recursively delete hidden files with exact extensi

2019-04-17 06:40发布

问题:

When I execute following line on CMD, it doesn't delete hidden files. What's wrong with this function?

For /r %%i in (*.mta) do del "%%i"

回答1:

Don't do it in a loop.

del /S /A:H <folder_name> *.mta

deletes recursively in subfolders, with the attributes, hidden; help del in cmd will give you more options.