HIDE FOLDER (WINDOWS)

Use a simple batch script to hide/unhide a folder named “private” on Windows. Note: this hides files but does not encrypt them.

Attachment

Locker Script (.bat)

Download and edit the password inside the script, then run it.

  1. 1

    Download the batch file

    Get the file above: “Locked and hide.bat”. Save it in a folder where you want to create the hidden “private” directory.

  2. 2

    Run the .bat file

    Double‑click it. It will create a folder named private if it doesn’t exist.

  3. 3

    Set your password in the script

    Right‑click the .bat file → Edit. Look for the line that asks for a password and replace Enter Your Password with your own password. Save the file.

  4. 4

    Move files into “private”

    Place any files/folders you want to hide inside the private directory.

  5. 5

    Lock (hide) the folder

    Run the .bat again and press Y when prompted. The folder will be hidden.

  6. 6

    Unlock (unhide) the folder

    Run the .bat file again, enter your password, and the folder will reappear.

Heads up: this method is for basic privacy (hides files) — it doesn’t encrypt. For sensitive data, use encryption (e.g., 7‑Zip with a strong password).

> Back to Blogs > Explore More