Tech Xpress

Show Hidden files/folders in Windows (When you can't) using the Command Prompt

A collegue of mine once approached me with a simple yet strange request. "How do I view hidden files and folders in Windows XP ? ". The fact that he had been using Windows for years astounded me. Off course, he knew how to view hidden files & folders, but this was a unique case.

He sent me a screenshot of his folder options box. Take a look. (Those who can't view the image click here)


Strangly, both 'Do not show hidden files and folders' & 'Show hidden files and folders' were enabled.

[Update: This may really be caused by some virus or malware. Fortunately, I stumbled on a website that provides a way to fix this. Check it out here[Thanks to Ramesh]. After fixing it, scan your PC with an antivirus]

My initial reaction was it may be a virus, trojan, spyware or some malware. Scanning with various anti-virus and anti-spyware software didn't reveal anything. The funny thing here was all the hidden files were perpetually hidden; we weren't able to get the files in the hidden folders even with a Windows search. So using the command prompt to find hidden files was the best option. How to do it?
Let's say you want to see all hidden stuff inside the D:\Temp folder. Check the steps below:

1. Go to Start >> Run. Type cmd and press Enter to open the command prompt.
2. Now navigate to the directory from the command prompt.
[For eg. Assume you are in C:\Documents and Setting\Jose. and you want to go to D:\Temp; type D: and press enter. This will take you the root D:\ in the command prompt. Type cd Temp in the command prompt and press Enter. Now you'll be inside D:/Temp from the command prompt.]
3. Type the command dir/ah to list all the files under D:\Temp.

Once you get the name of the files, you can view or run them by entering the file path in the address bar of Windows (The address bar of Windows is similar to the address bar of Internet Explorer, where you type the website or folder address).
To delete files use the del [Folder Name] in the command prompt. This will delete the folder you specify under the current directory. Eg del Temp

If you enjoyed reading this post, you are welcome to
Subscribe to Feeds
Or
Subscribe to the Tech Xpress email newsletter for free

More Reading:
Hide all desktop icons in Windows
Remove 'Folder Options' from tools menu in Windows
Hide folders in Windows without actually hiding them
posted by Vijeesh Ravindran, Tuesday, May 22, 2007


12 Comments:

Comment by Anonymous Anonymous on November 5, 2007 at 6:34 PM  
Hello,i have a problem with hidden file.
I can't enable show hidden file in my computer,i think it's a virus or something like that.i update my antivirus but couldn't find any virus,so what I should to do?!
@Anon- Try updating your Operating System..Apply the latest service packs & then run a full anti-virus scan.
Comment by Anonymous Anonymous on January 27, 2009 at 12:43 PM  
Thank you very much. I tried this (after some pointless attempts) and it totally worked!
thanks man. .
thank you very much
Thank you ever so much.
Comment by Anonymous Anonymous on September 6, 2010 at 10:29 AM  
We can find hidden files from command line too..
Source: Show hidden files from command line
Comment by Anonymous Anonymous on December 18, 2010 at 3:40 PM  
Hey.... very thanks 4 ur feed
Comment by Anonymous Anonymous on March 2, 2011 at 4:42 PM  
can any body tell me ,is their any cmd which display all hidden files in any drive.just like in window if we enable show hidden file it will display all hidden files.
Comment by Anonymous Anonymous on June 25, 2011 at 11:11 AM  
Thank you so much. Registry fix worked after hours of failed attempts. God bless you!
thanks ^^
can anyone say hw 2 restore hidden file using comand prompt