Use the following command:
dir /a:hd C:\folder\
The difference between what you were typing and this command is that you were using a
- to indicate the switch, not a
/. In most windows command line applications, this doesn’t matter, but in the case of the
dir command, you must use a slash, not a dash.
/a switch changes which attributes are displayed.
h shows hidden files and
d shows just directories. Make sure you keep the trailing slash on the end of the folder path. I just tested, and it worked fine.
dir/ashould show hidden folders.
dir /a:dshows all directories.
dir /a:hshows all hidden files.
dir /adh (without the colon) to combine.
To list all files and folders, including hidden and system ones, use
dir /a C:\
I found a script when i was younger that “locked your folder” it would basically hide files. I looked into the code and i understood it now and it uses the
attrib -h -s "foldername" to unlock it as it was locked with
attrib +h +s "foldername"
I saw the similar answer with -1 vote but it seems it kinda helped in my case as i forgot the password for the locker app thing (a simple batch file)
I wanted to see if i can get through without writting the password and i could, even though the password was in the file’s code XD
Ofcourse, don’t use this unless you are sure you are not messing up stuff, i knew it was ok cuz i read the code in the batch file.
Process To View All The Hidden Files And Folder using Command Prompt in Windows:
- Open Command Prompt (CMD.exe) as an Administrator.
- Navigate to the drive whose files are hidden and you want to recover.
attrib -s -h -r /s /d *.*and hit Enter.
- That is it. Now you will get all the hidden files and folder as general files and you can use it.