Consider you want to lock a folder named XXXX in your E:\, whose path is E:\XXXX. Now open the Notepad and type the following ren xxxx xxxx.{21EC2020-3AEA-1069-A2DD-08002B30309D} Where xxxx is your folder name. Save the text file as loc.bat in the same drive. Open another new notepad text file and type the following ren xxxx.{21EC2020-3AEA-1069-A2DD-08002B30309D} xxxx Save the text file as key.bat in the same drive. Steps to lock the folder: To lock the xxxx folder, simply click the loc.bat and it will transform into control panel icon which is inaccessible. To unlock the folder click the key.bat file. Thus the folder will be unlocked and the contents are accessible