4

A few years ago, I had hidden my folders and everything using this command:

attrib +h +s +r FolderName/FileName. 

Now I have forgotten all the folders/filenames. I, Of course know how to show my folders and files using this command:

attrib -h -s -r FolderName/FileName.

But I just forgot all my folder names.

Is there any way to show a list of hidden folders/files or show my all folders/files at once?

Toto
  • 17,001
  • 56
  • 30
  • 41
Huratio
  • 43
  • 1
  • 4
  • 1
    Not a command-line solution, but can't you just go to the containing folder in Windows, go to the View tab and check "Hidden items" in order to see your hidden files and folders? – Darrel Hoffman Mar 22 '22 at 17:03

3 Answers3

11

Open Powershell as administrator, run the following cmdlet:

Get-ChildItem C:\ -Hidden -Recurse

The above cmdlet will list all the directories and files hidden for C: drive. If you don't want to check subfolders, remove -Recurse.

Oxygel
  • 3
  • 3
Reddy Lutonadio
  • 17,120
  • 4
  • 14
  • 35
10

To do so recursively:

attrib -s -h -r /s "Folder\*"

Additional ways:

  • Explorer: ViewOptionsViewHidden files and directoriesShow...OK
  • Registry:
    Reg Add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 1
    Reg Add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v ShowSuperHidden /t REG_DWORD /d 1
    
  • Cmd:
    Dir /A:sh
    
JW0914
  • 7,052
  • 7
  • 27
  • 48
1

Go to your target folder in a command prompt as Admin and simply use:

ATTRIB /D /S

and it will display all the attributes on files and folders in your target folder and all subfolders.

CitizenRon
  • 136
  • 2