I am just using the rename function in command line.

rename 001.tabular 3972

As I read your code, it is renaming the files by simply adding the extension of .foobar to each one. I need to completely rename them, so I need to designate $old as $ARGV[0] and $new as $ARGV1 from a text file but it needs to be the column and not the element of the array.

Even when the file doesn't exist, if I change the "%03d" it still says won't clobber. If I can fix that code to rename the files as the value of column 1 that I am sorting on, I don't have to worry about the renaming code. But when I make changes to the code, I either get won't clobber or still get the exact same names as before (that have no meaning and need to be changed).


In reply to Re^2: Renaming Multiple Files with Different Names by Feral_Akodon
in thread Renaming Multiple Files with Different Names by Feral_Akodon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.