I have a FAT32 SD card with a file on it, that, viewed in Windows the filename consists of a long string of nonsense.

enter image description here

Viewed in my Android phone's Linux terminal, ls -a shows nothing in the directory. When I try to delete the parent directory with rm -rf deleteme, it fails with "Directory not empty". When I try to delete/move in Windows 7, it says the filename would be too long and/or Explorer crashes. Windows disk check doesn't find anything wrong.

How can I delete this?

link|improve this question

57% accept rate
feedback

2 Answers

up vote 3 down vote accepted

The cmd.exe command

dir /-N

shows the alternative DOS 8.3 character file names that are always present on FAT32. Use this name for the del command.

link|improve this answer
______~1 1,303 2010-07-07 11:56 PM It worked! – endolith May 16 '11 at 0:13
feedback

Also run top -u {your user name} and make sure that nothing's running that's using that directory when you're trying to delete it.

Hope that helps.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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