This isn't really a "programming" tip, but it's a little tidbit I'm glad to have found, having been plagued in the past with Files That Would Not Die. Corey Collins explains How to Remove "locked" Folders/Files on his blog:
First, open a command window and go to the directory where the illegal files and folders are. Type in dir /x. This will list the files with a truncated 8 character dos name. The files will now have a ~1 after them, they will only have legal characters in them, and only be 8 characters long. Now, type rmdir /s baddir~1. This will delete the directory and everything inside of it. This can be a little time consuming if there are a lot of files, but it works.Technorati tags:
Nice, but how to delete a single file in a folder and keep the other files of this folder intact?
Posted by: Ben at February 13, 2006 10:59 AM
Comments