Batch files


Using batch files ::
Batch files are used to make things less boring and bit faster.
It works on the principle of using the cmd for various tasks.
cmd uses the folder as directories.

To begin with
Batch files work with Windows only.There are scripts that work like batch files
on Linux but they known as bash.

What it does ::
It creates a custom user set on-click application.
The application can do the autonomous task like creating a folder, opening list of folders
etc.

Starting ::
A application to create folder/s and opening them

1)create a text file with .bat extension.
2)on creating it there would be a icon on the subsequent screen where the .bat file
was created.
3)right click on the icon and select the edit mode.
4)enter the following command in the file.

@echo off <—starts the cmd and executes the command
md folder1 <—creates a folder named "folder1"
start folder1 md foldername as required.

Batch files are great tools to work around as they have many advance features, along with creating and starting a folder.
The commands that are used are highly sensitive if used carelessly it might create unwanted results.

Folder Lock Without Any Software


 

Private Folder password prompt
Private Folder password prompt 

Folder Lock With Password Without Any software
Paste the code given below in notepad and ‘Save’ it as batch file (with extension ‘.bat’).
Any name will do.
Then you see a batch file. Double click on this batch file to create a folder locker.
New folder named ‘Locker’ would be formed at the same location.
Now bring all the files you want to hide in the ‘Locker’ folder. Double click on the batch file to lock the folder namely ‘Locker’.
If you want to unlock your files,double-click the batch file again and you would be prompted for password.
Enter the password and enjoy access to the folder.

 

CODE:

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%==type your password here 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