Other Interesting Articles
9. Creating Files that Lock Folders
You can create batch files to lock folders with a password. Here’s how:
- Open Notepad.
- Copy and paste the following code:
cls
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 you want 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 Locker “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Locked folder
goto End
:UNLOCK
echo Enter password to unlock folder
set/p “pass=>“
if NOT %pass%== PASSWORD goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
echo Open folder
goto End
:FAIL
echo Wrong password
goto end
:MDLOCKER
md Locker
echo Locker created
goto End
:End
- Replace PASSWORD with the password you want.
- Save the file with the .bat extension.
- Run the file to lock or unlock the folder.
10. Creating Files That Delete Themselves
You can create a batch file that deletes itself after it is run. Here’s how:
- Open Notepad.
- Copy and paste the following code:
echo off
del %0
- Save the file with the .bat extension.
- Run the file to delete itself.
Conclusion
By understanding and utilizing the tricks above, you can optimize the use of Notepad in your daily activities. Feel free to try and explore further, as Notepad has a lot of potential that you may not have realized.