Windows command to find hidden folders and files in a directory

In order to get a list of hidden files or folders in a directory, you can use this command:

dir /a:h >hiddenlist.txt

In this example we begin with a folder with these apparent contents:

Simply go to a particular folder on a drive, hold SHIFT + CTRL right click and select, 'Open command window here' .

Type in the command and press ENTER.

You'll see a text file is generated which lists a folder and a file at the root which were actually hidden.

Of course in Windows Explorer you can change a setting so hidden folders and files are always shown by going to Tools . . . Folder Options . . . View tab and checking off 'Show hidden folders, files and drives.', but when performing data collection it's good to be able to focus on things a user may have hidden.

Contact Me With Your Litigation Support Questions:

  • Twitter Long Shadow

© 2015 by Sean O'Shea . Proudly created with