CMD: How do I recursively remove the "Hidden"-Attribute of files and directories

batch-file, cmd, windows

Solution

Move the -h and specify that mydir is a directory

attrib /S /D /L -H mydir\*.*

Problem

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?

Original source