-
Website
http://www.cucirca.com/ -
Original page
http://www.cucirca.com/2007/02/05/how-to-lock-a-folder-using-notepad/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
cheyennebaybee
22 comments · 21 points
-
jess0112
17 comments · 4 points
-
Nikij Portelli
16 comments · 34 points
-
Fely
23 comments · 10 points
-
anon
93 comments · 68 points
-
-
Popular Threads
-
Scrubs Season 9 Episode 5 Our Mysteries
17 hours ago · 5 comments
-
Desperate Housewives Season 6 Episode 10 Boom Crunch
2 weeks ago · 294 comments
-
Dexter Season 4 Episode 12 The Getaway
1 week ago · 115 comments
-
Heroes Season 4 Episode 12 The Fifth Stage
3 weeks ago · 281 comments
-
Desperate Housewives Season 6 Episode 9 Would I Think of Suicide?
3 weeks ago · 171 comments
-
Scrubs Season 9 Episode 5 Our Mysteries
thanks.
Further, how am I prevented from simply noting the path and using the legacy commandline program "type" to list the contents of the BAT file?
Or even easier, simply dragging the BAT file to an open notepad program?
This is not a security measure, just an idea of someone that does not understand security and thinks that just renaming a folder secures it.
You should consider doing some research into security before writing articles on locking things. Perhaps you shoould rename this post how to rename a folder in a really complicated way.
Regards
Gary
I dont think this as security, the folder can be deleted once if someone mislead and delete the file it cannot be replaced
I thought so too.Couldn't figure why I couldn't return my file to the way it was.Then,in my "key.bat" text, I noticed I left out a "space" after the end bracket.There is one space. After I entered the space, closed "key.bat" and clicked it, my file returned to normal. Whether or not this is worth using is another Q. Maybe yes? Maybe No.
pls.help me,how i can unblock my .bat file,i can forgot my password to intered in notepad,so please tell me how i can got it?plz tell me as erlier as possible.
Nice idea that folder was converted as like control panel. After that folder act as like control panel.
But I am able to view that files through internet explorer. Kindly tell me if you have any other way.
I am waiting for your reply.
Ranjith J
But I am able to view that files through internet explorer. “When I convert that folder as zip”
Kindly tell me if you have any other way.
I am waiting for your reply.
@ECHO OFF
title Folder Personal
if EXIST "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" goto UNLOCK
if NOT EXIST Impt goto MDIMPT
: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 Impt "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
attrib -h -s "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==TYPE THE PASSWORD goto FAIL
attrib -h -s "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
ren "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" Impt
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDIMPT
md Impt
echo Impt created successfully
goto End
:End href="#comment-179433">@ranjith
Thanks for you tips. kindly explain to me how to use this command line. i just want to generate bat file or in command i need to write this whole content.
Kindly educate to me it will be useful for me
Thanks in advance.
i have much better batch code for this:
Pass code is not based in this bath file - When first turn this batch file you are need enter password - it will be stored in additional *.key file (it is system hidden file - not visible)
Save this code like Lock.bat (recommended)
Maybe look amazing because is not in one lineup, window is too small for my code :)
Just copy and paste to notepad and save like Lock.bat
------------------------ CUT HERE ------------------------------------
@echo off
color c
title Verification validity
if exist Documents goto Locking
if exist "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}" goto pass
:password1
color a
cls
title Enter your password (Requirement one word)
:password
cls
echo.
echo Please enter password:
echo.
set/p "passw=>"
echo.
echo.
cls
echo.
echo Retype password:
echo.
set/p "passwo=>"
if %passw%==%passwo% goto next
cls
echo.
echo.
echo ERROR! The passwords not equal . Please try again!
echo.
pause
goto password
:next
if not exist reg.key goto ForwardDown
attrib -h -s reg.key
:ForwardDown
echo %passwo% > reg.key
attrib +h +s reg.key
if exist Unlock.bat goto renaming1
if exist Lock.bat goto continue
msg %username% Error in code for folder create!
goto end
:renaming1
ren Unlock.bat Lock.bat
:continue
md Documents
cd Documents
start. Documents
goto end
cls
:pass
if not exist reg.key goto password1
set/p saved="
if %check%==%saved% goto RunMove
goto ERROR
:ERROR
cls
echo.
echo Unlock fail !!!
echo.
echo Remain two attempts !!!
echo.
echo Try again:
echo.
set/p "check2=>"
if %check2%==%saved% goto RunMove
:ERROR2
cls
echo Error again
echo.
:loop
echo Remain one attempts !!!
echo.
echo Are you want to continue (Y/N)
echo.
set/p "choice=>"
if %choice%==Y goto step
if %choice%==y goto step
if %choice%==N goto end
if %choice%==n goto end
echo Please press Y to continue and N for exit
goto loop
:step
echo Enter password:
echo.
set/p "check3=>"
if %check3%==%saved% goto RunMove
goto end
:RunMove
attrib -h -s "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
ren "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}" Documents
cd Documents
start. Documents
cd..
if exist Unlock.bat goto renaming2
if exist Lock.bat goto goto end
msg %username% Error in code for unlocking Dokuments
goto end
:renaming2
ren Unlock.bat Lock.bat
goto end
:Locking
ren Documents "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
if errorlevel 1 goto message
attrib +h +s "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
if exist Lock.bat goto renaming3
if exist Unlock.bat goto end
msg %username% Error in code for locking Dokuments
goto end
:renaming3
ren Lock.bat Unlock.bat
goto end
:message
msg %username% Impossible locking Documents. Close all opened folders and try again!
:end
exit
------------------------- CUT HERE -----------------------------------
It makes a lots of sense as in the earlier one the password can be seen easily by "right clicking" the .bat file and clicking edit. In this particular one since the password is hidden in system hidden file, it can't be taken out so easily unless system hidden files are shown.
THANX