MacOS – How to delete file or directory with accent character

macos

I have a directory within my iTunes folder structure that has an accent character in it which I am trying to delete.

If I do an ls on the directory I get this:

ls -al
ls: Radiů Disney_ Jams Vol. 2: No such file or directory
total 0
drwxr-xr-x 3 scott staff 102 Jul 29 13:16 .
drwxrwxr-x@ 21 scott staff 782 Jul 29 13:24 ..

I've tried rm -rf * but after that I attempt an ls -l I still get:
ls: Radiů Disney_ Jams Vol. 2: No such file or directory

Any way to delete the directory with offending filename? If I attempt to delete the parent directory I get a "Directory not empty message"

Best Answer

If you look at this answer from Stack Overflow, you will learn that filenames on HFS must be in fully decomposed form, in which an accent on a letter is encoded separately from the letter itselves (and after the letter). In your case, the filename has somehow been snuck onto the filesystem in composed form instead, which confuses the filesystem to the point where it can see that the file is there, but still cannot find it. If Disk Repair cannot find and fix the problem, I much doubt that there is much you can do. There is an ancient File Name Encoding Repair Utility out there, but as it officially supports OS X 10.1 and 10.2 only, I would be rather hesitant about running it on a modern OS X if I were you. So your best bet is to hide the problematic directory somewhere it won't bother you.