I can't find a command or simple batch of commands to recursively remove the "Hidden"-Attribute from files and directories. All commands like "attrib" and "for" seem to skip hidden files. E.g.:
attrib -H /S /D /L mydir
doesn't do anything at all, because it skips all hidden stuff. Does someone know how to do this with standard Windows tools?
To remove a directory and all its contents, including any subdirectories and files, use the rm command with the recursive option, -r . Directories that are removed with the rmdir command cannot be recovered, nor can directories and their contents removed with the rm -r command.
Select the Start button, then select Control Panel > Appearance and Personalization. Select Folder Options, then select the View tab. Under Advanced settings, select Show hidden files, folders, and drives, and then select OK.
To permanently remove a directory in Linux, use either rmdir or rm command: For empty directories, use rmdir [dirname] or rm -d [dirname] For non-empty directories, use rm -r [dirname]
rm -rf /some/path/* deletes all non-hidden files in that dir (and subdirs). 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/.
You can't remove hidden without also removing system.
You want:
cd mydir
attrib -H -S /D /S
That will remove the hidden and system attributes from all the files/folders inside of your current directory.
Move the -h and specify that mydir is a directory
attrib /S /D /L -H mydir\*.*
if you wanna remove attributes for all files in all folders on whole flash drive do this:
attrib -r -s -h /S /D
this command will remove attrubutes for all files folders and subfolders:
-read only -system file -is hidden -Processes matching files and all subfolders. -Processes folders as well
To launch command prompt in administrator mode
attrib -h -r -s /s /d "location of the drive letter:" \*.*
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