Sometimes it can seem impossible to delete a file/directory in Vista.
This is because of the way security is implemented.
The easiest way to get around this is to first make your account the owner of the file/directory in question. It will help if you have an Administrator account.
You can do this in the Windows file/folder properties but this is quite confusing, so try it in the command line.
Click on the start menu, and type cmd in the Search Box, then hit Enter.
In the command prompt type:
takeown /f [path to file/directory]
The /f switch means that we're taking ownership the specified file in the path.
Now you should see a message like:
SUCCESS: The file (or folder): "[path]" now owned by user "[computer name]\[user name]".
The next step is to give yourself permission to delete the file. This is achieved with:
cacls [path] /G [your user name]:F
/G means we are granting permissions to a user.
And the F means Full Control
Now you should be allowed to delete it. So just do so with:
del [path]
That's it!
No comments:
Post a Comment