Thursday, October 9, 2008

Deleting a Vista Directory you don't have access to.

I use delta copy on Vista ultimate to backup several windows machines as well as my cvs repository on Linux. I inadvertedly configured the service to start as a network service but found I couldn't access the backup at all. I subsequently changed it to start as my user and could access the new directories but was left with a backup directory I couldn't access or delete.

This is how I eventually managed to delete the directory.

Start accessories right click on the command prompt and select run as administrator. At the command line type

takeown /F [directory] /R

cd [directory]

cacls *.* /T /G "[PC NAME\USER NAME]" :F

cd ..

rd [directory] /s