useful script, file renamer in python

Kristian Hermansen kristian.hermansen-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon May 28 13:03:38 EDT 2007


On 5/28/07, Joshua D. Abraham <jabra-1vnkWVZi4QaVc3sceRu5cw at public.gmane.org> wrote:
> for those of you who know me i don't like python.

I'm sorry to hear that :-)  Yes, the script I sent was by a noob, but
it got the job done!  Perl is fine too, just keep it simple and
logical.  I still haven't figured out why I was unable to rename the
files I had, which is a first for me.

It had to do with a special character, which may have been UTF-8 in
the file name.  Depending on the tools I used (sed, rename, grep, sh,
bash, dash) the file name would be displayed differently as it
traversed various tools.  This caused many issues.  I didn't really
look into it very far, but it might be nice to explore the file name
problem for nefarious means at some point!

In the end, I just thought I would post the script here because I know
a lot of people on this list are probably not programmers and don't
want to hack out some code of their own.  I was just too lazy.  And
now I'll probably use jabra's script instead when rename fails on some
weird file names...heh  (Yes, the rename command is native, so why
would you need anything else?)

> here is what i use to rename files
>
> http://www.ccs.neu.edu/home/jabra/code/rename.pl

Very clean and nice.  A+ :-)
-- 
Kristian Hermansen

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.






More information about the Discuss mailing list