Tech Tips Home
The Best Tech Tips And Daily Deals
Newsletter On The Internet!

WorldStart Tech Tip And Store Search
Email: Password: Login Remember Me
looking for freeware

Like what you see here? Subscribe to the Tech Tips newsletter!   Email: Subscribe

Using the Command Prompt to Reveal Hidden Files

Monday, November 7th, 2011 by | Filed Under: File & Disk Management, Security Help

Some viruses leave behind nasty side effects, even when your antivirus program has cleaned the actual virus from your computer. If your desktop icons are missing and your C: drive appears blank, don’t panic — your files haven’t gone permanently AWOL. Common viruses, such as the Windows 7 Recovery virus, will hide your files in an attempt to coerce you into paying for the virus’s removal. When you view your desktop or click on your C: drive, it may appear that all of your files have been deleted, but they haven’t — the virus has simply hidden them. You can restore them easily using a simple command prompt trick that works in Windows XP, Vista and 7.

Click the Start button in the lower left corner of your task bar. Type cmd in the search box at the bottom of the menu and press Enter. If you’re using Windows XP, click Run and type cmd into the Run box.

You will see this screen:

Command prompt

Type attrib -s -h -r c:/*.* /s /d and press Enter to execute the command. The command prompt window should look like this after you’ve typed the command:

Command prompt after entering 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.

~Jacqui Frye

Tags: , , , , , ,

56 Responses to “Using the Command Prompt to Reveal Hidden Files”

  1. jhusper says:

    Thank you very much! It is very helpful because it recovered my files.

  2. rsamin says:

    God bless u, thanks a lot.
    Pls, how to open software/files which is already burned as image format, by using cmd, for instance (Ashampo Burning Studio has the ability to burn items/software on its image format therefore, the image will not open itself if you click on it, until you install Ashampo (ABS) to support image open/run properly), therefore, cmd can open any format of burning? such as Ashampo format, Nero format. If yes, how do we do?

  3. Emmanuel Afreh says:

    I had the same problem and I tried the cmd-attrib command.
    However, it says “Access Denied” for all the files.
    my windows partition isn’t showing its files so it shows “boot manager missing” anytime I try to boot from HDD

    I am now trying to recover them by making my HDD and external drive but it says, “access denied” please, help!

  4. shubhankar says:

    I had hidden a file with cmd prompt long time age and now I don’t know the exact file location. Only i know is the file name. So how can I now access the that file???
    pls help me..

  5. R S says:

    the command worked great , disabled all my hidden files in the SD Card

  6. R S says:

    Opps , enabled :)

  7. Fali says:

    i’m doing attrib comand. but the process showing “access denied”
    nothing happened to that folder. the file still hide

  8. goutham says:

    dude thank u so much for suggestion. it worked.

  9. Akhlaq says:

    Nice Effort Thanks…

  10. Amit says:

    Thanks a lot.
    Good job. God bless you. really superb

  11. Abdul Samadh says:

    Fine irecover my Hidden Files Thank you

  12. reza says:

    thank you for your help but how can I rehide my secure files?

Leave a Reply

Like these tips? Get them for FREE in your email!

WorldStart's Tech Tips Newsletter

  • Tech Tips Daily - Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

  • Tech Tips Weekly - If you don't want our Tech Tips newsletter every day, then sign up for this weekly newsletter to get the best information of the week. Sent on Fridays.

Other Newsletters

  • WorldStart's Daily Deals - Every week, we send out great deals in our Daily Deals newsletter. Many of these deals are exclusively for our Daily Deals newsletter subscribers and can't be found with our regular specials.

  • Just For Grins - Each issue includes a couple clean jokes, some funny quotes, and a hilarious reader's story. Newsletter is sent five days a week.

Enter Email Address:


Your e-mail address is safe with us!
We only use it to send you the newsletters you request. It is NEVER disclosed to a third party for any reason, ever! Plus, if you decided you don't like our newsletters (don't worry, you'll love them), unsubscribing is fast and easy.

Free Newsletter Signup

Tech Tips Daily

Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

Tech Tips Weekly

The week's best in tech and computer help. Get your issue sent to your email every Friday!

WorldStart's Daily Deals

The very best deals on the Internet! Get a new set of incredible sales every day of the week!

Just For Grins

Clean jokes, funny quotes, and hilarious comics. Sent 5 times a week straight to your email.


Love Worldstart? Refer A Friend!

looking for freeware
WorldStart's Premium Membership

Tip Archive