blog advertising is good for you


blog advertising is good for you
User login

problem with illegal characters

Ok, so I have files on my computer extracted from a windows RAR archive that i can’t get rid of anymore. The problem is that the filenames contain illegal characters, and so whenever I try to do anything with them, os X returns error code -43. Apparently this happens when there are illegal characters in the filename (there are french accent graphes in all the filenames). The problem is I can’t rename them either, because that also returns error code -43, nor can I empty them from the trash. I tried removing them through the terminal, but bash claims it can’t find the files even though ‘ls’ lists them. Any suggestions as to what i could try?

Average rating
(0 votes)
About kumakae

Adam Knight's picture

Have you tried tab completion? Bash will escape names properly if you enter the first part of the file’s name and press tab to finish it (presuming the differentiating portion of the name does not fall on a diacritically-enhanced character, this should work).

If that doesn’t work, post a copy of “ls -l” for the directory as a followup comment (place the output between <pre> tags to get the “Terminal-esqe” formatting.

cp

yep, tried tab completion. Here’s the “ls” output for a couple files:

??=?er
Caf?? del mar (25 Anniversary) 1980-2005_cd1.jpg
Caf?? del mar (25 Anniversary) 1980-2005_cd2.jpg
Caf?? del mar (25 Anniversary) 1980-2005_cd3.jpg

And tab completion for each of those files (in the above order) gives:

\310\253\=^Her
Caf\303\251\ del\ mar\ \(25\ Anniversary\)\ 1980-2005_cd1.jpg
Caf\303\251\ del\ mar\ \(25\ Anniversary\)\ 1980-2005_cd2.jpg
Caf\303\251\ del\ mar\ \(25\ Anniversary\)\ 1980-2005_cd3.jpg

Any attempted command in the shell on these files returns (for example):

rm: Café del mar (25 Anniversary) 1980-2005_cd1.jpg: No such file or directory

hmmm ok, i think that’s all for the moment. The files seem to exist, as the Finder gives them a file-size.

I was in a similar position a while back, but I was able to rename the files in the Finder, and then delete them.

Have you tried this?

I was in your position, asking for help all around the place, the files did not even vanish from “Trash” giving me the same error number.

I tried a myriad of apps and tricks – to no avail.

Solution: yes, there was life before 10 :) If you happen to own a computer that still boots into 9, you can do it that way. Simply delete under OS 9. Otherwise get yourself one to boot yours up in target mode, and use the other one to delete the offending french stuff :) In my case it was chinese signs that made my system choke… And still wonder where they came from in the first place.

Ahh…. I seem to remember that classic did not work!

JC's picture

I’ve had this problem before, as well. My solution was to move the parent folder into /tmp, which is cleaned by the system during the boot process.

hmmm, good idea! tried it though and it wouldn’t work for me. The problem is that the files are on an external drive. I can move them fine using the Finder (won’t work on the shell) within the volume, but it won’t move them to another volume. Hmmm, i’ll have to see if i can get to a windows computer and get the hfs volume to mount… Thanks for all the ideas though!

We are having a similar problem, only we have so many files that need their names changed, that it’s not reasonable to do it manually. Does anyone know a tool that will do this in bulk (besides sed, awk, perl, etc)?

Such a catch-22! I have this problem with an XP box. My only solution sofar is to boot into Linux (Ubuntu) and rename/delete from there.

While I can say for certain that this works for XP, I’d bet that’d it’d work on a PPC or Intel Mac too.

I have this problem with chinese char, and I dont want to delete it, just read it… what can I do ?

Post new comment
The content of this field is kept private and will not be shown publicly.
14 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.