filebatch-filecmddelete-file

Delete both: hidden and normal files with cmd


Following line recursively deletes only HIDDEN files with .mta extension

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

What I want to do is, to delete both: hidden and normal files with .mta extension. How to do it?


Solution

  • Use /a on its own: del /s /a *.mta

    eg:

    C:\temp\z>attrib *
    A   H        C:\temp\z\hidden
    A            C:\temp\z\normal
    C:\temp\z>del /s /a *
    
    C:\temp\z\*, Are you sure (Y/N)? y
    Deleted file - C:\temp\z\hidden
    Deleted file - C:\temp\z\normal