1.
D:/My
**(My is the name of the folder)
2.
Now go to Run and type Cmd to open command prompt
3. Type D: (to locate D: drive)
4.
then type cacls my /p everyone:n
**(My is the name of the folder)
5.
It will confirm you like this "Are you sure (y/n)" type y
Now you can't access that folder.
6. To unlock the folder simply change n with f in the following command:
cacls my /p
everyone:f
Enjoy!