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?
rm -rf /some/path/. * deletes all hidden files in that dir (but not subdirs) and also gives the following error/warning: rm: cannot remove directory: `/some/dir/.
Use the dir /a command to list all files (including hidden and system files). Then use the attrib command with -h to remove hidden file attributes, -s to remove system file attributes, or -h -s to remove both hidden and system file attributes.
The del command displays the following prompt: Are you sure (Y/N)? To delete all of the files in the current directory, press Y and then press ENTER. To cancel the deletion, press N and then press ENTER.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With