There are a lot of methods that you can use to create a password protected folder, most of which require the use of some third party software. Using this neat method you can protect folder by password with a quick batch script. Below you can find the step by step instructions to protect folder with password.
- Batch Script
- Filename Extension
- Create A New Document
- Create A New Text Document
- Tap Enter.Now the text document is created
- To protect folder with password. Copy the code into notepad
- Find “Your password” in the above code
- Replace “Your password” with password of your choice
- Now Goto->File
- Select Save AS
- Select File type. You can select it in save as type window
- Select All files from drop down menu
- Rename file as Locker.bat (.bat ext must)
- Now file is saved
- Double click Locker.bat file to generate “MyFolder”
- Copy your secret file into “Myfolder”
- Now click Locker.bat to lock “MyFolder”
- Type “Y”to lock
- Click Enter,Now the “MyFolder” window will disappear along with your secret files
- To unlock the folder,Double click Locker.bat file.
- Now enter the password you have mentioned in Step 6
- Type Password .Press Enter
- The locked folders are back
- Now you can find your hidden files
- To protect folder with password again repeat step 15,16 and 17
1.Batch Script
A batch file is a sort of content document in DOS, OS/2 and Microsoft Windows. It comprises of a progression of directions to be executed by the order line mediator, put away in a plain content record. A batch file may contain any order the mediator acknowledges intuitively and use builds that empower restrictive expanding and circling inside the bunch document, for example, IF, FOR, and GOTO marks.
The expression “batch ” is from clump preparing, signifying “non-intelligent execution”, however a batch file may not process a cluster of various information.
Like Job Control Language (JCL), DCL and different frameworks on centralized server and minicomputer frameworks, batch file were added to facilitate the work required for certain ordinary assignments by enabling the client to set up a content to computerize them.
At the point when a clump record is run, the shell program (generally COMMAND.COM or cmd.exe) peruses the document and executes its directions, regularly line-by-line.Unix-like working frameworks, for example, Linux, have a comparable, however increasingly adaptable, sort of document called a shell script.
The filename expansion .bat is utilized in DOS and Windows. Windows NT and OS/2 additionally included .cmd. batch file for different conditions may have diverse augmentations, e.g., .btm in 4DOS, 4OS2 and 4NT related shells.
2.Filename Extension
.bat
The main filename augmentation utilized by Microsoft for cluster documents. This expansion keeps running with DOS and all renditions of Windows, under COMMAND.COM or cmd.exe, regardless of the diverse ways the two order mediators execute clump records.
.cmd
Utilized for batch file in Windows NT family and sent to cmd.exe for elucidation. COMMAND.COM does not perceive this document name augmentation, so cmd.exe contents are not executed in the wrong Windows condition unintentionally.
Furthermore, affix, dpath, ftype, set, way, assoc and provoke directions, when executed from a .bat record, change the estimation of the errorlevel variable just upon a blunder, though from inside a .cmd document, they would influence errorlevel notwithstanding while returning without an error. It is additionally utilized by IBM’s OS/2 for batch file.
.btm
The expansion utilized by 4DOS, 4OS2, 4NT and Take Command. These contents are quicker, particularly with longer ones, as the content is stacked totally prepared for execution, as opposed to line-by-line.
It’s important to note that this will not actually conceal your data from somebody who knows what they are doing.
3.Create A New DocumentYou can create a new document by Right-Click on Desktop or within a folder
4.Create A New Text DocumentCreate a new text document
3. Tap Enter.Now the text document is created
4. To protect folder with password. Copy the below code into notepad
cls
@ECHO OFF
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST MyFolder goto MDMyFolder
:CONFIRM
echo Are you sure to lock this folder? (Y/N)
set/p “cho=>”
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren MyFolder “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock Your Secure Folder
set/p “pass=>”
if NOT %pass%== your password goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” MyFolder
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDMyFolder
md MyFolder
echo MyFolder created successfully
goto End
:End
5. Find “Your password” in the above code
6. Replace “Your password” with password of your choice
7. Now Goto->File
8. Select Save AS
9. Select File type. You can select it in save as type window
10. Select All files from drop down menu
11. Rename file as Locker.bat (.bat ext must)
12. Now file is saved
13. Double click Locker.bat file to generate “MyFolder”
14. Copy your secret file into “Myfolder”
15. Now click Locker.bat to lock “MyFolder”
16. Type “Y”to lock
17. Click Enter,Now the “MyFolder” window will disappear along with your secret files.
18. To unlock the folder,Double click Locker.bat file
19. Now enter the password you have mentioned in Step 6
20. I have mentioned SWOT as my password.Press Enter
21. Now, the locked folders are back
22. Now you can find your hidden files
23. To protect folder with password again repeat step 15,16 and 17
Pros
- Protect folder with password is simple to go.
- The main thing you have to do is to spare the content and make the task.
- It needn’t bother with any confused activity or expert information.
Cons
- No sheltered and is anything but difficult to be split.
- Does not support to bolt a cluster of folder at any given moment.