Now I would like to delete a folder. Any ideas?
Close (or kill) all programs started from this very folder. The same
goes for libraries, data files, and documents opened from this path.
If you have all files successfully removed from a folder and still
can't delete it - than you should check which process has an open
handle to that folder. Use the Handle program from SysInternals for
this task:
www.sysinternals.com/Utilities/Handle.html
Let's assume you want to delete the folder c:\foobar and get an
error. Execute Handle.exe with the folder path as a parameter,
then:
handle.exe c:\foobar
Note: You can detect processes locking a certain file the same way.
Now you should see the name of the 'guilty' process. Shut it down
by simply closing it. Or kill it using the ProcessExplorer program
from SysInternals (for instance):
www.sysinternals.com/Utilities/ProcessExplorer.html
After that you should be able to remove the folder.
BeAr