Sign in with
Sign up | Sign in
Your question
Closed

Listing hidden files at command line

Last response: in Windows 7
Share
October 22, 2010 6:49:25 PM

How do you list/view hidden files in a DIR using command line. (Got it wrong on a test today) :p  couldnt find it im my A+ book on which switch to use. I put /h but apparently that was wrong :) 

thanks
October 22, 2010 7:00:05 PM

should have said view all files in a DIR including hidden files, not just the hidden files themselves.


Tried using DIR /ah but that only lists hidden files and nothing else. :( 
Score
0

Best solution

a b $ Windows 7
October 22, 2010 7:09:33 PM

Try "dir /a".
Share
Related resources
October 22, 2010 7:13:49 PM

Thanks :) 
Score
0
October 22, 2010 7:14:00 PM

Best answer selected by mpavao81.
Score
0
October 26, 2010 2:34:07 PM

mpavao81 said:
How do you list/view hidden files in a DIR using command line.


It is not DIR, but an easy way to list all files AND display the attributes is to use:

C:\> attrib

Score
0
February 21, 2013 3:22:14 AM

Type attrib -s -h -r c:/*.* /s /d and press Enter to execute the command.

Allow the command to finish executing (it may take a few minutes). When it’s done, close the command prompt window and check your desktop — your files, hidden by the virus, have been restored. You can use the same trick to restore files the virus may have hidden on other drives, including removable storage such as flash drives and external hard drives; just change the drive letter in the command above to the drive letter of the storage device with the hidden files.
-hisham pasha-
hishampnk@gmail.com
Score
0
February 22, 2013 6:37:56 AM

hishampasha said:
Type attrib -s -h -r c:/*.* /s /d and press Enter to execute the command.


The question was only on how to see hidden files, not changing every attribute on every single file. The above step should not be done if not totally sure that you want to do such large file system modification.
Score
0
March 1, 2013 12:34:25 AM

hishampasha said:
Type attrib -s -h -r c:/*.* /s /d and press Enter to execute the command.

Allow the command to finish executing (it may take a few minutes). When it’s done, close the command prompt window and check your desktop — your files, hidden by the virus, have been restored. You can use the same trick to restore files the virus may have hidden on other drives, including removable storage such as flash drives and external hard drives; just change the drive letter in the command above to the drive letter of the storage device with the hidden files.
-hisham pasha-
hishampnk@gmail.com



Thanks a lot. The original question did not ask about this issue, but that is exactly what I need to do, for the exact reason you gave. Virus authors must be the most hated people on the planet.
Score
0
a c 395 $ Windows 7
March 1, 2013 12:37:24 AM

This topic has been closed by SR-71 Blackbird
Score
0
!