I ran into this problem (actually I’ve ran into it multiple times) when I can’t delete a folder in Windows 7 because a filename has a malformed character. In Linux you can have characters like (ñ). But, when Windows gets a hold of the file at some point (like via my external HD) it renames the character as a question mark (?). That means I couldn’t delete the file using explorer or the del command (or robocopy, deltree, etc). But, after some research and thinking I figured it out.
- In Windows 7: Run cmd.exe in Administator Mode.
- cd into the Directory with the filenames.
- run: chkdsk /V /f [My bad files were on another drive other than the OS drive, so it was able to dismount it. If it is the OS drive, it may have to do this stage at startup.]
- Wait (May have to reboot).
Results/Cmd Log: (See at superuser)
As you will see the result was that chkdsk actually deleted the files for me. So, if you want to keep the files, I don’t know what to do, but this will get rid of the files for sure.
Vote it up if it worked for you!