Rename of FileName using PERL

Discussion in 'Perl Misc' started by Laarni, Sep 17, 2008.

  1. Laarni

    Laarni Guest

    Hi,

    Anyone can help me on this query:

    I need to rename all the files in the directory with this format:

    Original FileName : txn.data
    New File Name : txn.0000000001.data (where 0000000001 come from the
    database table where column is seqquence number. The 0000000001 is
    incrementing)


    thanks for all the help in advance.


    Regards,
    Laarni
     
    Laarni, Sep 17, 2008
    #1
    1. Advertising

  2. Laarni <> wrote:
    >I need to rename all the files in the directory with this format:


    Please see 'perldoc -f rename'

    >Original FileName : txn.data
    >New File Name : txn.0000000001.data (where 0000000001 come from the
    >database table where column is seqquence number. The 0000000001 is
    >incrementing)


    Where is the problem?

    jue
     
    Jürgen Exner, Sep 17, 2008
    #2
    1. Advertising

  3. Laarni

    Ben Morrow Guest

    Quoth Laarni <>:
    >
    > I need to rename all the files in the directory with this format:


    perldoc -f rename
    perldoc -f opendir
    perldoc -f readdir

    > Original FileName : txn.data
    > New File Name : txn.0000000001.data (where 0000000001 come from the
    > database table where column is seqquence number. The 0000000001 is
    > incrementing)


    perldoc DBI

    Ben

    --
    Heracles: Vulture! Here's a titbit for you / A few dried molecules of the gall
    From the liver of a friend of yours. / Excuse the arrow but I have no spoon.
    (Ted Hughes, [ Heracles shoots Vulture with arrow. Vulture bursts into ]
    'Alcestis') [ flame, and falls out of sight. ]
     
    Ben Morrow, Sep 17, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9l?=

    Extract filename from a filename typed by user

    =?Utf-8?B?Sm9l?=, Aug 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,068
    Travis Murray
    Aug 24, 2004
  2. Replies:
    1
    Views:
    1,603
    Roland de Ruiter
    Jun 15, 2006
  3. Ed
    Replies:
    10
    Views:
    46,709
    alok000707
    Jul 13, 2010
  4. Beauregard T. Shagnasty

    Re: filename.gif or filename.gif.jpg?

    Beauregard T. Shagnasty, May 30, 2008, in forum: HTML
    Replies:
    1
    Views:
    812
    Jonathan N. Little
    May 30, 2008
  5. Bergamot
    Replies:
    0
    Views:
    483
    Bergamot
    May 30, 2008
Loading...

Share This Page