Unhide Files By Single Dos Command

by Bilal Arshad in Security on July 13, 2010

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)

ScreenShot00029 Unhide Files By Single Dos Command

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 *.*

ScreenShot00031 Unhide Files By Single Dos Command

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

{ 26 comments… read them below or add one }

1 Phaoloo July 13, 2010 at 1:33 pm

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

Reply

2 zaldhie July 21, 2010 at 3:25 pm

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

Reply

3 Metal Snake December 5, 2010 at 1:38 am

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”.

Reply

4 Rajnish Bakshi December 20, 2010 at 5:28 pm

This is great……..

Reply

5 yajapa January 17, 2011 at 8:04 pm

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

Reply

6 Maddy January 26, 2011 at 11:26 pm

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

Reply

7 Forever8 February 4, 2011 at 4:41 pm

Metal Snake,

Thanks! It worked perfectly!

Reply

8 David February 9, 2011 at 6:02 pm

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

Reply

9 Sanix February 9, 2011 at 11:26 pm

@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.

Reply

10 zaldhie February 9, 2011 at 6:05 pm

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

Reply

11 Amit Kumar February 19, 2011 at 9:54 pm

my all file & folder hide in my pen drive due to virus

is any suggestion to unhide all file & folder

Reply

12 Metal Snake February 20, 2011 at 6:37 pm

@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”.

Reply

13 Lakshmi Priyanka February 26, 2011 at 2:09 pm

Thanks a lot sir.

Reply

14 enchektom March 4, 2011 at 5:46 pm

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

Reply

15 chandan March 5, 2011 at 6:54 pm

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.

Reply

16 Alan Milan October 7, 2011 at 4:13 pm

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″}

Reply

17 Metal Snake March 5, 2011 at 7:14 pm

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. :)

Reply

18 chandan March 5, 2011 at 7:26 pm

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

Reply

19 Sumit March 14, 2011 at 12:48 pm

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

Reply

20 Senthil Kumar March 22, 2011 at 6:23 pm

thaks………

Reply

21 Shahzad Fsd April 5, 2011 at 11:50 pm

Thanks for this beautiful command its very helful

Reply

22 gerald gonzales May 23, 2011 at 3:20 pm

Thanks for this website…It helped me a lot.

Reply

23 rahul August 10, 2011 at 8:27 pm

thank u alll …

Reply

24 guru@g December 8, 2011 at 10:47 am

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

Reply

25 boy March 13, 2012 at 4:50 pm

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 !!!

Reply

26 Sanix March 13, 2012 at 6:49 pm

@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..

Reply

Leave a Comment

Previous post:

Next post: