Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently, I loaned my flash disk to one of my friends, who had Mac OS. He copied a file on it, whose name included a backslash (\).

The flash disk is NTFS formatted. Windows does not allow such filenames, and neither opens the file, nor deletes it, nor lets me delete the file.

There are naive approaches to this problem, like:

  • Formatting the flash disk;
  • Giving it back to my friend and asking to rename it;
  • Loading into some live Linux and renaming it.

However, I'm looking for something more clever, like a program that can do the trick under Windows.

PS: There's a tool called NTFSWalker which can browse the MFT records of the NTFS, but is unable to make any changes to them.

share|improve this question
2  
You'll find How to force Windows XP to rename a file with a special character? a useful read as well - the only real answer there was to use Linux. –  DMA57361 Nov 24 '10 at 18:33
    
Try Check Disk. (Right click on disk icon → Properties → Tools → under Error-checking, click Check Now → check Automatically fix file system errors.) This was one of the suggestions in the linked question above, but was never tried. –  Bavi_H Nov 25 '10 at 4:32
    
@Bavi_H: Sorry, Check Disk did not work either. –  Sadeq Dousti Nov 25 '10 at 9:21

4 Answers 4

All Win32 APIs use the backslash as a directory separator. There is a slight chance that the POSIX subsystem accepts it as part of the file name, so you could try mv from Services for Unix.


I wouldn't say using Linux to fix is "naive", if Unix was what broke it in the first place.

share|improve this answer
    
I tried mv before. It didn't work. –  Sadeq Dousti Nov 24 '10 at 19:36
    
About "naive": I meant some solution that comes to mind at the first place. –  Sadeq Dousti Nov 24 '10 at 19:38
    
@Sadeq: Which mv are you talking about? –  grawity Nov 24 '10 at 20:04
2  
@Sadeq: Both of them are plain Win32 programs. I explicitly mentioned Services for Unix for a reason — its programs run in a separate "POSIX" subsystem, with different rules than those of Win32. –  grawity Nov 25 '10 at 12:58
1  
The POSIX subsystem also uses NtOpenFile to open files, and NtOpenFile treats the path as a whole, not as a series of components (there's a flag to use "POSIX" semantics, but that's only for case sensitivity) -- so it follows the same rules. –  Mehrdad Jan 22 '12 at 8:24

I've found that 7zip can often deal with strange files when Windows fails (useful for paths that are too long to delete normally) - give that at try.

share|improve this answer
    
Sorry. 7z gives the same error as Windows. –  Sadeq Dousti Nov 24 '10 at 19:37
    
Doesn't work for me either –  Mark Jeronimus Feb 29 '12 at 5:28
1  
7z worked some magic for my case, which was filenames ending with a non-compliant space character. I tried a ton of utilities for dealing with this but only 7z worked. –  Mike Simpson Aug 29 '13 at 23:19

You can use CHKDSK /F from DOS prompt to fix the errors, and then RD /S <DIR> where <DIR> is the directory you want to delete. Be careful as this will delete the directory and all its sub-directories.

share|improve this answer

I opened the folder with inaccessible character files in 7zip file manager. There, I renamed it and BINGO, it got renamed. Thus I was able to access the file.

7zip is a freeware file compression utility, better than RAR.

share|improve this answer
2  
Isn't your answer the same as Dentrasi's? –  Sadeq Dousti Nov 10 '11 at 10:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.