Unhide Files By Single Dos Command

Usually when virus hide files and it also remove folder options it is much difficult to get the files quickly if one is in hurry, although such virus can be removed manually (Read Remove EXE virus manually) ;
But I’m going to tell the the way in which you can UN-hide all the hidden files by on single command.
To apply this command follow the following steps

go to Start > Run > type cmd
Dos will open type cd.. (two to three time until only drive letter left)

now type the drive letter in which you want to Unhide the files lets suppose in my case its F:\
this will open the F: drive
Now type the following command attrib -r -a -s -h *.*

Press enter this command will un-hide all the hidden files in Drive F even its portable memory stick or usual hard disk


Posted

in

by

Comments

31 responses to “Unhide Files By Single Dos Command”

  1. Phaoloo

    This tip is so useful when you are in recovery mode.

  2. zaldhie

    if you want to see all hidden files and folders including system files type using cmd prompt
    type:
    c:>dir/ah
    wwhhoollaaa! simple…yeah right

  3. Metal Snake

    Instead, this command will unhide all Folders + subfolders and files:
    attrib *. -h -s /s /d
    For Windows Vista/7 Users, Start CMD by right clicking on it and selecting “Run as Administrator”.

  4. Rajnish Bakshi

    This is great……..

  5. yajapa

    nice fix, i did this tutorial myself on my website. I used the one Metal Snake used though.

  6. Maddy

    Thanks a lot……… madarchodo…… it works?????

  7. Forever8

    Metal Snake,
    Thanks! It worked perfectly!

  8. David

    I have windows 7 on my machine. I have tried using attrib *. -h -s /s /d to unhide hidden folders on my external drive and on drive C but i am having the error message of Access denied.
    Any help.
    Thanks

    1. Sanix

      @David
      You need to start your command prompt with administrative privileges on Windows 7. See the following article for more details:
      http://www.technize.com/the-requested-operation-requires-elevation/
      @zaldhie
      Thanks a lot for suggesting the correct solution.

  9. zaldhie

    David try to right the cmd and choose run as administrator it might help to you

  10. Amit Kumar

    my all file & folder hide in my pen drive due to virus
    is any suggestion to unhide all file & folder

  11. Metal Snake

    @Amir Kumar:
    Open CMD and then enter your pen drive letter followed by colon, i.e. g:
    press enter
    now type the below line and press enter and wait for all files n folders to be visible again:
    attrib *. -h -s /s /d
    If you are using Windows 7 or Vista, then Start CMD by right clicking on it and selecting “Run as Administrator”.

    1. jas

      hi i have the same problem, i already tried that command but it says access denied… 🙁

  12. Lakshmi Priyanka

    Thanks a lot sir.

  13. enchektom

    i already run as administrator but it still said access denied…hmmm..

  14. chandan

    My pen-drive got infected with “Vobfus” worm/virus family. Although, Microsoft Security Essential was nifty enough to detect it and remove it but whats left behind are shortcuts of folders and original folders are hidden. I am unable to UNHIDE them through Windows Property command. They are visible when in command mode and dir/a but I am unable to restore my pen-drive to prior condition. Any Help/suggestions
    Thanks in advance to everybody.

    1. Alan Milan

      got also the same problem… it was infected by win32 worm and it couldn’t be unhide though the virus been gone…
      default3349 {“method”:”validate”,”params”:[],”id”:1,”jsonrpc”:”2.0″}

  15. Metal Snake

    For people who can’t understand CMD command lines to unhide folders and files:
    Steps:
    1. Download this software “FreeCommander Portable” from
    Link: http://portableapps.com/apps/utilities/freecommander_portable
    2. After download, Open “FreeCommander” and go to your Pendrive.
    3. Select all the files/folders you want to unhide and press “Shift + Enter” on keyboard.
    4. This will open “Attribute/Timestamp” window.
    5. Check “set attribute” and uncheck the checkboxes “Read Only, Hidden and System”.
    6. Also check “Include files and folders in sub folders” to apply attributes to sub folders and files as well.
    7. Click ok and now your pendrive will be same as before. 🙂

  16. chandan

    Actually this link helped me better, although it is almost same what this post says but it explains and guides better. http://www.computerhope.com/attribhl.htm
    example :-
    dirve letter:>attrib -r -a -s -h [name of hidden file/folder]
    batch unhiding/adding &/or removing of attributes didnt worked for me. I tried it on XP service pack 3, Vista Ultimate and Windows 7 Ultimate 32 bit.
    Hope this would help you all and other.
    Thanks for reading.
    Regards

  17. Sumit

    Dear i hide somedata in subfolders through prperties function in D Drive. but after using attrib command in DOS i culd not unhide them.
    Please guide me another trick.Rply

  18. Senthil Kumar

    thaks………

  19. Shahzad Fsd

    Thanks for this beautiful command its very helful

  20. gerald gonzales

    Thanks for this website…It helped me a lot.

  21. rahul

    thank u alll …

  22. guru@g

    Great..!!!!!!!!!!!1
    it worked…………@Thnx

  23. boy

    it not working and doesn’t show the hidden file 🙁
    when i type : attrib -r -a -s -h *.*
    it show that :
    The target of the symbolic link G:\DCIM\???? does not exist
    The target of the symbolic link G:\DCIM\ does not exist
    please help !!!

    1. @boy: Try changing your working directory in the command prompt and try this command on other folders. If this works, the problem will most probably with the single folder..

  24. Ali noyan

    metal snake , thank u soooo much for the link .

  25. makamache

    Instructions
    1 Open the Start menu and type “cmd” into the Search box to open the command prompt. In Win 7 after you type cmd in search box, right click on the command prompt icon & then click on run as administrator.
    2 DOS will open, and then you type cd… (This you do 2 (two) to 3(three) times until drive letter is only left).
    3 Type the drive letter in which you want to unhide the files let’s suppose in my case it’s F:, this will open the F: drive.
    Now type the following command attrib -r -a -s -h /s /d *.* & press enter. Done

  26. nitin

    can any1 tell how to unhide a folder which is in some other folder without knowing their names.?

  27. sakthi

    working good