When a file or folder cannot be renamed or deleted, and you have the correct permissions (i.e. Not an access denied error), it's a good bet the filename or folder name is damaged and has odd characters and/or spaces at the start or end.
One way to deal with these items is to use wildcards to match up with the file or folder. If you need to delete the item, we recommend using a rename first, to avoid accidentally deleting other files or folders if you make an error.
For example, we have the file "foo.txt ". Note the space at the end. It will not be visible in Explorer. To fix it:
Open the run dialog (Windows key + R) and type cmd
At the prompt, navigate to the folder where the bad folder/file resides.
Tips: Use the drive letter like d: to switch drives. Use the change directory command "cd" to switch directories. To go to the Windows directory you type cd \windows
Use the rename command with wildcards to change the name to something valid. In our example above we would type:
rename foo.txt* newfoo.txt
Tips: The "*" represents one or more characters. Use a "?" to represent a single character.
BE CAREFUL!- a rename with wildcards can grab multiple files in the same folder that match and rename them all!
Rename works on both folders and files in the same directory, but does not change any files in sub-directories below the current directory.
FaultWire Staff Posted: 12-Mar-2010
Check out what others say about this issue and review or add your own comments and solutions!
While we believe this information up to date and accurate, FAQware is not responsible for any inaccuracies. If you find something that is out of date or inaccurate, please let us know at
so we can correct it.