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.

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?

share|improve this question
add comment

2 Answers 2

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.

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

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.

share|improve this answer
add comment

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.