How To: Hide Files on a USB Flash Drive
How To: Hide Files on a USB Flash Drive
This article, “How To: Hide Files on a USB Flash Drive,” explains two free methods to conceal files on a USB drive using built-in Windows features. One method is quick and basic; the other is more advanced and harder to detect.
Overview of the Two Methods
Method 1: Standard Hidden Attribute
This method is the easiest. Anyone can right-click a file or folder, go to Properties, and select the Hidden checkbox. This will hide the file unless a user has Windows configured to show hidden files.
Pros: Easy and fast
Cons: Easily bypassed
Method 2: System Hidden Attribute
This method hides a file using both the system and hidden attributes. Windows will not show these files—even if “Show hidden files and folders” is enabled—unless the user also disables “Hide protected operating system files.”
Pros: Harder to detect
Cons: Slightly more technical
How to Hide a File Using the Hidden Attribute
Right-click the file or folder ? Properties ? check the Hidden box ? click OK.
If Windows is set to not show hidden files, it disappears from File Explorer. However, it still shows in the Command Prompt:
If the user has “View hidden files and folders” enabled, the file is visible again:
How to Use the System Hidden Attribute
Let’s take it a step further and apply the system attribute in addition to the hidden flag.
Step 1: Prepare the File
Place the file (e.g., text.txt) onto the USB flash drive.
Step 2: Open Command Prompt on the USB Drive
Click in the File Explorer address bar, type cmd, and hit Enter.
Step 3: Apply the System Hidden Flags
At the prompt, type:
attrib +s +h D:\text.txt
Replace D:\ with your actual USB drive letter.
Type exit to close the prompt. Then unplug and reconnect the USB drive. The file will now be invisible—even with hidden files shown—unless the system file setting is also disabled.
Confirming the Hidden File
Open Command Prompt and type:
dir /a:h
You’ll see hidden files listed—even the system hidden ones—but they won’t appear in File Explorer.
How to Open or Restore the Hidden File
Option 1: Show Protected Files (Not Recommended)
Enable “Hide protected operating system files” in Windows Explorer. This reveals system-hidden files but also exposes critical OS files to potential deletion.
Option 2: Remove Attributes
In Command Prompt, type:
attrib -s -h D:\text.txt
Option 3: Open Without Changing Attributes
To open the file without unhiding it, use:
notepad D:\text.txt
Need Stronger File Protection?
If you require stronger security, consider a Secure Disk solution. These USB flash drives hide entire partitions until a password is entered. They’re hardware-based, making them immune to software workarounds or hacks.
For more info, check out Nexcopy’s Secure Flash Drives.
Tags: file, flash drive, hide, how to, usb