Into Windows

  • Home
  • Windows 11
  • Windows 10
  • Windows 7
  • Privacy
You are here: Home » Windows 10 » Hide Files And Folders Via Command Prompt In Windows 10

Hide Files And Folders Via Command Prompt In Windows 10

Last Updated on July 2, 2019 by admin Leave a Comment

The File Explorer in Windows 10 enables you to hide files and folders. To hide a file or folder, you need to right-click on the file/folder, click Properties and then select the Hidden option. The hidden file/folder won’t show up in the File Explorer as long as the Don’t show hidden files, folders, or drives option is turned on in the Folder Options.

In addition to the File Explorer, you can hide files and folders via the Command Prompt as well. You can use the Command Prompt in the event when the Folder Options is not opening or want to hide files and folders without booting into Windows 10.

Hide a file via Command Prompt in Windows 10

Here is how to hide files and folders via the Command Prompt in Windows 10.

IMPORTANT: When you hide a file or folder using either Command Prompt or File Explorer, the file/folder will be hidden until the Hide hidden files, folders, or drives option is selected in the Folder Options. Anyone who has access to your PC can change this setting to view hidden files and folders. Therefore, if you want to hide or protect crucial files or folders, we advise you to use third-party folder locker software.

Complete the given below instructions to hide files and folders via Command Prompt in Windows 10.

Step 1: Open the Command Prompt. No need to open it as administrator.

Step 2: At the Command Prompt window, type the following command:

attrib +h FileOrFolderPath

In the above command, replace the FileOrFolderPath with the actual path to the file or folder.

For instance, if the path to the file/folder is D:\Test, then, you need to type:

attrib +h D:\Test

hide files and folders via Command Prompt pic2

Press the Enter key to execute the command.

Tip: To copy the file or folder path, open up the File Explorer and navigate to the location where the file or folder that you would like to hide is present. Hold down the Shift key, right-click on the file/folder and then click the Copy as path option to copy the file/folder path to the clipboard.

To show a hidden file or folder

Step 1: At the Command Prompt window, execute the following command:

attrib -s -h FileOrFolderPath

You might also like to read our how to hide drives using Command Prompt guide.

Filed Under: Windows 10 Tagged: Security

Related Posts

  • Launch Elevated Command Prompt From Command Prompt
  • How To Hide Files/Folders On Windows 10 Desktop
  • How To Hide Files And Folders In Windows 10
  • Quickly Hide Files And Folders In Windows 8 With Keyboard Shortcuts
  • How To Hide Drives In Windows 10/8/7 Using Command Prompt
  • How To Hide Files And Folders From Search In Windows 10

Leave a Reply

Your email address will not be published. Required fields are marked *

Advertisements

Search Into Windows

Recent posts

  • 5 Ways To Go To Desktop In Windows 11
  • How To Show Battery Percentage On Taskbar In Windows 11
  • Fix: AMD Software Adrenalin Edition Not Opening In Windows 11
  • How To Show Year On Windows 11 Taskbar
  • Windows 11 24H2 Is Available Now
  • How To Create 7z & TAR Files In Windows 11 Without Using Additional Apps
  • How To Remove Bell Icon From Taskbar In Windows 11
  • How To Reinstall Windows 11 Without Losing Apps And Files
  • How To Hide/Show Files & Icons On Desktop In Windows 10/11
  • How To Show Hidden Icons On Taskbar In Windows 11

About us

  • About Us
  • Contact Us
  • Privacy Policy

Copyright © 2025 · Into Windows