File and Folder - Hide or Unhide

How to Hide or Unhide a File or Folder in Vista, Windows 7, and Windows 8

   Information
This tutorial will show you how to set the hidden attribute of a file or folder to be hidden or unhidden in Vista, Windows 7, and Windows 8.






OPTION ONE

Through the File's or Folder's Properties Page


1.To Hide a File or Folder
A) Right click on the file or folder, and click on Properties.

B) Check the Hidden box, and click on OK. (see screenshots below)
File1.jpg

Folder1.jpg
C) If this is for a folder and it has a subfolder or file in it, then you will also need to select (dot) to only hide the folder or to hide the folder and all of it's subfolders and files in it. Click on OK. (see screenshot below)
Folder2.jpg
D) In Folder Options, make sure that Don't Show hidden files, folders, and drives is selected (dotted).
3. To Unhide a File or Folder
A) Open Folder Options, select (dot) Show hidden files, folders, and drives, and click on OK. (see screenshot below)
NOTE: This way you will be able to see the hidden file or folder to be able to unhide it.
Folder_Options-1.jpg
B) Right click on the file or folder, and click on Properties.

C) Uncheck the Hidden box and click on OK. (see screenshots below step 2B)

D) If this is for a folder and it has a subfolder or file in it, then you will also need to select (dot) to only unhide the folder or to unhide the folder and all of it's subfolders and files in it. Click on OK. (see screenshot below step 2C)

E) In Folder Options, select (dot) Don't Show hidden files, folders, and drives, and click on OK. (see screenshot below step 3A)



OPTION TWO

Through the Command Prompt


   Note
This will show you how to hide or unhide a file or folder using the ATTRIB command.

About_ATTRIB.jpg

While you can run this command in a non-elevated or elevated command prompt, you would get the best results using a elevated command prompt.

1. Open a elevated command prompt, then do either step 2, 3, 4, 5, 6, 7, or 8 below for what you would like to do.

2. To Hide a specific File
A) Open Folder Options and uncheck the Hide extensions for known file types option and click on OK. (see screenshot below)
NOTE: This way you will be able to see the file extension in your file's name to use in the command below.
Folder_Options.jpg
B) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of File with extension within quotes below with your files's full path and name with the extension included within quotes instead.

Code:
ATTRIB +H "[COLOR=red][B]Full Path of File with extension[/B][/COLOR]"

NOTE: For example, if I wanted to hide a text file named File with the file extension .txt on my desktop, I would type this command below.

Code:
ATTRIB +H "C:\Users\UserName\Desktop\File.txt"
Attrib_Hide_File.jpg
C) In Folder Options, make sure that Don't Show hidden files, folders, and drives is selected (dotted).

D) The file should now be hidden. Go to step 7.
4. To Unhide a specific File
A) Open Folder Options and uncheck the Hide extensions for known file types option and click on OK. (see screenshot below step 3A)
NOTE: This way you will be able to see the file extension in your file's name to use in the command below.

B) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of File with extension within quotes below with your files's full path and name with the extension included within quotes instead.

Code:
ATTRIB -H "[COLOR=red][B]Full Path of File with extension[/B][/COLOR]"

NOTE: For example, if I wanted to unhide a hidden text file named File with the file extension .txt on my desktop, I would type this command below.

Code:
ATTRIB -H "C:\Users\UserName\Desktop\File.txt"
Attrib_Unhide_File.jpg
C) The file should now be unhidden. Go to step 7.
5. To Hide a specific Folder
A) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of Folder within quotes below with your folder's full path within quotes instead.

Code:
ATTRIB +H "[COLOR=red][B]Full Path of Folder[/B][/COLOR]"

NOTE: For example, if I wanted to hide a folder named Folder on my desktop, I would type this command below.

Code:
ATTRIB +H "C:\Users\UserName\Desktop\Folder"
Attrib_Hide_Folder.jpg
B) In Folder Options, make sure that Don't Show hidden files, folders, and drives is selected (dotted).

C) The folder should now be hidden. Go to step 7.
6. To Unhide a specific Folder
A) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of Folder within quotes below with your folder's full path within quotes instead.

Code:
ATTRIB -H "[COLOR=red][B]Full Path of Folder[/B][/COLOR]"

NOTE: For example, if I wanted to unhide a hidden folder named Folder on my desktop, I would type this command below.

Code:
ATTRIB -H "C:\Users\UserName\Desktop\Folder"
Attrib_Unhide_Folder.jpg
B) The folder should now be unhidden.
7. To Hide a Folder and all Contents in the Folder
NOTE: This will hide the selected folder along with all subfolders and files inside this folder.
A) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of Folder within quotes below with your folder's full path within quotes instead.

Code:
ATTRIB +H "[COLOR=red][B]Full Path of Folder[/B][/COLOR]\*" /S /D

NOTE: For example, if I wanted to hide a folder named Folder on my desktop along with all of it's contents, I would type this command below.

Code:
ATTRIB +H "C:\Users\UserName\Desktop\Folder\*" /S /D
Attrib_Hide_Folder.jpg
B) In Folder Options, make sure that Don't Show hidden files, folders, and drives is selected (dotted).

C) The folder should now be hidden. Go to step 7.
8. To Unhide a Folder and all Contents in the Folder
NOTE: This will unhide the selected folder along with all subfolders and files inside this folder.
A) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of Folder within quotes below with your folder's full path within quotes instead.
Code:
ATTRIB -H "[COLOR=red][B]Full Path of Folder[/B][/COLOR]\*" /S /D

NOTE: For example, if I wanted to unhide a hidden folder named Folder on my desktop and all of it's contents, I would type this command below.

Code:
ATTRIB -H "C:\Users\UserName\Desktop\Folder\*" /S /D
Attrib_Unhide_Folder.jpg
B) The folder should now be unhidden.
9. When done, close the command prompt.
That's it,
Shawn







 
Last edited:
Nar, you would just hide the desktop.ini file.

With it being impossible to know what to hide and not to hide due to the huge amount of files, you might consider reinstalling Windows 7. :(
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top