The following code will surely help you hide as well as lock your folder. You just need to replace the following strings in the code:
YOURFILE/FOLDERNAME: Enter the name of folder or file(with extension) you want to hide.
SETYOURPASSWORD: Set you password by replacing this string.
NOTE: COPY THE FOLLOWING CODE IN NOTEPAD/WORDPAD SAVE IT AS "GIVEITANAME.BAT".
Anyone can see your password by RightClick>Edit, thats why i have coded it in such a way that the Directory of the Folder/File to be hidden should be known. For further prevention you should save this Batch file in a Directory other than the one where your hidden Folder/File is present.
@echo off
if exist YOURFILE/FOLDERNAME goto CODE
if exist YOURFILE/FOLDERNAME.hidden goto UNLOCK
echo File/Folder to be hidden doesn't exist...
set /p "%pause%=>"
:CODE
echo Are you sure you want to hide the folder/file? (Y/N)
set /p "hide=>"
if "%hide%"=="y" goto HIDE
if "%hide%"=="Y" goto HIDE
if "%hide%"=="n" goto FAIL
if "%hide%"=="N" goto FAIL
:HIDE
echo Enter the path of the folder where the folder/file exist that you want to hide:
set /p "%dir%=>"
set %dir% | cd
ren YOURFILE/FOLDERNAME YOURFILE/FOLDERNAME.hidden
attrib +s +h +r YOURFILE/FOLDERNAME.hidden
goto END
:UNLOCK
set /p "pass=>"
if not "%pass%"=="SETYOURPASSWORD" goto FAIL
attrib -s -h -r YOURFILE/FOLDERNAME.hidden
ren YOURFILE/FOLDERNAME.hidden YOURFILE/FOLDERNAME
goto END
:FAIL
echo Invalid Password
:END
No comments:
Post a Comment