[Vorbis] [sorta offtopic] Removing bad bytes from filenames

Chris Harrington (Personal) webkid at webkid.com
Mon Aug 20 12:07:05 PDT 2007


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

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.

$ ls -b *Thou*18*
Various\ -\ O\ Brother,\ Where\ Art\ Thou\277\ (18)\ -\ Fairfield\ Four\ 
-\ Lonesome\ Valley\ [4.07].ogg
$ rename Thou\0277 Thou *.ogg
$ ls -b *Thou*18*
Various\ -\ O\ Brother,\ Where\ Art\ Thou\277\ (18)\ -\ Fairfield\ Four\ 
-\ Lonesome\ Valley\ [4.07].ogg

Any bright ideas? Awk, maybe? Hmm.

Thanks.
-Chris

PS Sorry for being off topic. I'm sure other Vorbis enthusiasts have 
come across this migration issue before.


More information about the Vorbis mailing list