I was trying to limit access to my sister's folder using the cacls command.
The folder's name is Alka's

It is in D:\My Documents>

I used the following command to lock it and now I cannot open it!!!

cacls "Alka's" /e /p everyone:n

To open it again I used the following code:

cacls "Alka's" /e /p everyone:f

this should have opened the folder but all I get is the error message "Access is Denied" in the command prompt.....however to my surprise the same code was working well to all other folders in the same directory and elsewhere very well!!!! PLEASE HELP me regain access to this folder as it conrained all her important files and folders....

IT'S URGENT!!!!

You could always boot off a linux live cd and copy the files to another folder or some other media. Have you tried running a CMD session as Administrator and rerunning cacls to /e /g everyone:f

First of all, you can't possibly lock an administrator out of a folder.
To get your data back open window's explorer and navigate to the folder. Right click and select properties, switch to Security tab and click advanced. You can try to change permissions, but chances are you won't have sufficient rights. Instead go to owner tab and change owner. You might need to confirm everything by clicking OK, and start over, before you edit permissions (again from GUI).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.