On 10/31/05, George Georgalis <[EMAIL PROTECTED]> wrote:
> On Sun, Oct 30, 2005 at 10:55:45AM -0800, Todd Walton wrote:
> >Without personally writing a whole script to handle it, how can I
> >intelligently rename masses of files?  In ACDSee, an image viewing
> >program for Windows, they had this cool feature where you could select
> >a bunch of files and then hit F2 (rename) and it would let you plug in
> >a reverse regular expression of sorts.  Like, if I have a bunch of
> >files named bob.txt, cracker.txt, 92.s.txt, jjjjj.text, and so on, I
> >could rename them to "document-##.txt".  Then bob.txt would become
> >document-01.txt, cracker.txt would become document-02.txt and so on.
> >It handled incrementing the number to be applied.  There was also
> >provision for reusing the already existing name in the new name.  So
> >on.
> >
> >Where can I get something like that?
>
> try man rename,
>
>         rename [ -v ] perlexpr [ files ]
>
> it's probably installed.

That I can see from reading the man.pages and fumbling a few times,
rename(1) as supplied with Fedora Core 3 does not have the properties
impled by "perlexpr" in your summary of it.  Nor does it have directly
the ability to insert sequence numbers into file names.

 rename from to file...

So perhaps it is another program by the same (re)name.  In fact, on
FC3 /usr/bin/rename is a compiled program from util-linux-2.12a, while
on another system here on my desk, /usr/bin/rename is a link to
/usr/bin/prename, which is a Perl script.

As a side comment, I do not think much of a utility program that
requires me to write a Perl expression on the fly to accomplish
something.  I would rather write a shell script.

    carl
--
    carl lowenstein         marine physical lab     u.c. san diego
                                                 [EMAIL PROTECTED]


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to