in reply to Re: Clean filenames with /usr/bin/rename
in thread Clean filenames with /usr/bin/rename

Thanks but the program already exists and it's in Perl:
$ head -n 4 `which rename` #!/usr/bin/perl -w # # This script was developed by Robin Barker (Robin.Barker@npl.co.uk), # from Larry Wall's original script eg/rename from the perl source.
I just need a new improved expression that catches all stupid file names and converts them to something sensible. The original post does it ok, I'd hoped someone had a thoroughly tested expression ready to post.

Replies are listed 'Best First'.
Re: Re: Re: Clean filenames with /usr/bin/rename
by parv (Parson) on Jun 18, 2003 at 00:38 UTC

    Let me try it again. See sub sanitize for the matching pattern in various s///, in the referenced program, that i consider fit the mold of unholy names on unix. You could then round up all the matching regexen to create one regex for rename.