Closed Solved

Listing hidden files at command line

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
9 answers Last reply Best Answer
More about listing hidden files command line
  1. 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. :(
  2. Best answer
    Try "dir /a".
  3. Thanks :)
  4. Best answer selected by mpavao81.
  5. 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
  6. 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
  7. 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.
  8. 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.
  9. This topic has been closed by SR-71 Blackbird
Ask a new question

Read More

Hidden Files Command Line Windows 7