Skip to content
Techusers

Techusers

Learn To be a Dev

  • Home
  • Guide
  • Security & Privacy
  • Tech News
  • Computer
  • Top List
  • What is
  • Engineering
  • How To
  • Tech Terms
  • Toggle search form

Pendrive folder lock using cmd in windows

Posted on 24/06/201920/07/2022 By Techuser

What is Pendrive Lock?

It is the encryption of Pendrives using any external storage devices using any one encryption method. There are several applications available for locking the storage devices like Pendrives, Memory cards, etc.

This helps you to lock folders inside the Pendrive or Memory card(SD Card) without installing the third party softwares.

Steps to follow: (By images)

Step 1

Insert the Pendrive into the PC or Laptop.

Carefully Note your Pendrive letter which is like H:

Step 2

Then, create a new folder inside the Pendrive and name it. (I have named it as techusers )

Now, run the Command prompt as an administrator.

Step 3

Then type the following commands,

H:
attrib << your folder’s name >> +s +h

Example: attrib techusers +s +h

screenshot

After completing the above cmd, you will notice that the folder hidden.

Step 4

Create the new text document in the same pendrive folder. Then copy the code below and paste into the text document file.

code:

@echo off
set pass=12345      // here set your own password instead of 12345
echo please enter your password
set /p ui=
if %ui%==%pass% (goto open)
echo wrong password
pause & exit
:open
start techusers    // Type your folder name instead of techusers
  • In the 2nd line, you can change the pass= any password.
  • At last line, start <<folder name>>
  • After saving the file as .cmd or .bat file, you can see a cmd file inside your Pendrive folder.
  • Then open the bat file, it will ask for password and enter it…

Then save the file as view hidden.cmd or view hidden.bat or you can save with any name but the extension should be .cmd or .bat

Video Tutorial

Also read: How to hide a folder in windows

Also Read: Qualcomm Snapdragon 865 vs MediaTek Dimensity 1000 ( MTK6889 )

Related

How To, Security & Privacy

Post navigation

Previous Post: Install Kali linux Live on USB Drive(With Persistence)
Next Post: Pendrive space reduces [16 GB Becomes2.28 MB] (100% Solved)

100% disk usage Audio Formats cyber cybersecurity databreaches domainsearch breaches entertainment firefox monitor Gaming have i been pwned haveibeenpwned how to secure files install wordpress in localhost Kali Linux learn cybersecurity linux Machine Learning netflix privacy Search engine secure password security Strands technews Video Formats Windows Windows 11 Wordle WordPress installation xampp wordpress xampp wordpress installation

  • About us
  • Contact us
  • Privacy Policy

Follow us

  • Instagram

Copyright © 2025 Techusers.

Powered by PressBook WordPress theme