[Vorbis] [sorta offtopic] Removing bad bytes from filenames
Ulrich Windl
ulrich.windl at rz.uni-regensburg.de
Mon Aug 20 23:10:57 PDT 2007
On 20 Aug 2007 at 14:07, Chris Harrington (Personal) wrote:
> I'm moving my Ogg Vorbis collection off of my Linux server and onto my
> laptop. I plan on using iTunes to play my collection, but, that's a
> whole 'nother can of worms.
>
> I'm having trouble moving my complete collection over because dbPowerAmp
> (an application I used to love) made some dumb decisions about naming my
> files. For example, in track/album/artist names that contained a
> question mark ("O Brother, Where Art Thou?") it would insert the octal
> byte 0277; an upside-down question mark.
>
> It was a curiosity in Windows, but it's a real headache now. I have a
> LOT of files that I'm copying over, and I have a lot of these
> poorly-named files to deal with.
>
> I transfer the files across using a really basic netcat pipe:
> tar -c | nc :: nc | tar -x
In a first attempt, have you tried replaxing tar with zip/unzip? Most likely
you'll have to fix your filenames on Linux before transferring.
>
> but tar pukes on the files with bad filenames.
>
> Like the example I cite above, I can't seem to actually pass the correct
> parameter to rename to get it to remove \0277 from my filenames. I
> really don't want to do this manually.
sed -e 's/[^-A-Z, 0-9]/_/g' # very brutal, but you get the idea...
Ulrich
More information about the Vorbis
mailing list