Sinisterly
Locking Files and Folders with a simple Batch Script - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Hacking (https://sinister.li/Forum-Hacking)
+--- Forum: Tutorials (https://sinister.li/Forum-Tutorials)
+--- Thread: Locking Files and Folders with a simple Batch Script (/Thread-Locking-Files-and-Folders-with-a-simple-Batch-Script)

Pages: 1 2


Locking Files and Folders with a simple Batch Script - harnoor - 04-02-2014

Features
+ Locked/Unlock folder w/ Custom Password(s).
+ Hide anything inside!
+ Works on Windows!
+ Delete Feature

1. Open Notepad.

2. Copy code below and paste it in Notepad.

Quote:@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the 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 Locker "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 folder
set/p "pass=>"
if NOT %pass%==ComputerMods goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
Be sure to change the password in Notepad!



3. Save it as: Locker.bat (make sure to select Save as Type: All Files).

4. To edit code, Right click icon on desktop (or saved location). Select "Edit".


How to Lock & Hide the Folder.
Click the icon it creates on you desktop.
(This create a visible folder on your desktop, which you can place items into).
After you have finished editing contents of your folder, Click the icon to lock and hide the folder.

How to Unlock & Show folder.
Click the icon it creates on you desktop.
Enter Password.

Credits:- Computermods


RE: How To Lock Files And Folders With Password Using Notepad - prumzy - 04-02-2014

tanx for sharing sir!


RE: How To Lock Files And Folders With Password Using Notepad - alok9shm - 04-10-2014

Thanks. Good one. But i guess windows will show the files you hide using +system and +hidden attributes, when system files are checked as shown. Correct me If i'm wrong.


RE: How To Lock Files And Folders With Password Using Notepad - PROHACKER123 - 04-20-2014

Should I type my password from the :UNLOCK set/p pass: or from the :Lock set/p"cho?
One more thing I tried to put a password from the unlock menu and I open the file and it asked me to put the password and I typed my password but it says invalid password what happen here?

I'm making a new file of the locker.bat and I typed it in a another name I named it Lock.bat I opened it and its asking me for a password what happen?


RE: How To Lock Files And Folders With Password Using Notepad - PROHACKER123 - 04-20-2014

Should I type my password from the :UNLOCK set/p pass: or from the :Lock set/p"cho?
One more thing I tried to put a password from the unlock menu and I open the file and it asked me to put the password and I typed my password but it says invalid password what happen here?

I'm making a new file of the locker.bat and I typed it in a another name I named it Lock.bat I opened it and its asking me for a password what happen?


RE: How To Lock Files And Folders With Password Using Notepad - The Real Slim Shady - 04-20-2014

And anyone can open the bat file and view the password.

... so secure...


RE: How To Lock Files And Folders With Password Using Notepad - The Real Slim Shady - 04-20-2014

And anyone can open the bat file and view the password.

... so secure...


RE: How To Lock Files And Folders With Password Using Notepad - Ligeti - 04-20-2014

I don't know who is Computermods but looking at the title I would assume that he/she is a skid!

"Using notepad"!?! What the...

I discourage having threads like this in our community.

At least try to explain the code... and please don't take this personally @harnoor, my goal simply is to have a better community with interesting HQ threads!

Thanks and Peace


RE: How To Lock Files And Folders With Password Using Notepad - Ligeti - 04-20-2014

I don't know who is Computermods but looking at the title I would assume that he/she is a skid!

"Using notepad"!?! What the...

I discourage having threads like this in our community.

At least try to explain the code... and please don't take this personally @harnoor, my goal simply is to have a better community with interesting HQ threads!

Thanks and Peace


RE: Locking Files and Folders with a simple Batch Script - unohex - 04-25-2014

It is damn simple to figure it out... just right click on the locked .bat file edit with notepad and see the pswd