I have a bunch of files on a Ubuntu box, which have various characters in their filenames that Windows doesn't accept (mostly ":" and "*", but possibly others).

What's the simplest way to get these all renamed and moved to a Windows machine? It's OK to replace these characters with something like "[colon]" and "[asterisk]".

link|improve this question

75% accept rate
1  
You should avoid such names even under Linux (especially *). – cYrus Jan 29 '11 at 14:43
3  
@cYrus Depends on how you handle files. I imagine it's only an issue with scripting and in shells. I'm on OS X and the only forbidden character is :, which is bad enough. Naming documents after their contents is useful, and if an article name ends with a question, so should the file name. – Daniel Beck Jan 29 '11 at 14:49
@cYrus and I do, in my software, but some software has been written by people who don't. For example, qmail uses : in almost every filename it creates. – romkyns Jan 29 '11 at 14:55
@Daniel Beck: Sure, but unfortunately having a file system that supports such names it's not enough as you can use programs that mess the whole thing. I don't even use spaces. – cYrus Jan 29 '11 at 14:56
Great! Mine wasn't a solution, just an advice. – cYrus Jan 29 '11 at 14:58
feedback

1 Answer

Take a look at Glindra rename and detox.

Source: Fixing Unix/Linux/POSIX Filenames: Control Characters (such as Newline), Leading Dashes, and Other Problems

link|improve this answer
That page shows a 404. Google cached copy. – Daniel Beck Jan 29 '11 at 15:44
That is one awesome rant by David Wheeler! Especially after I had just bashed my keyboard after trying to cd into a directory which JungleDisk named "~\irina". Wanna guess whether tab completion worked on it?... – romkyns Jan 29 '11 at 16:02
Detox is for making Windows files Unix-friendly, not the other way around. – endolith Feb 20 '11 at 2:12
feedback

Your Answer

 
or
required, but never shown

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