Once you got the meterpreter session use ‘shell‘command to get command prompt of the target.
Type Cacls (Folder Name) /e /p everyone:n and press Enter.
This will lock your “Movies Folder” folder from D drive
If you want to unlock the folder you may just change the parameters
For unlock Cacls (Folder Name) /e /p everyone:f