Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Batch file renaming - on identical name, keep only most recent file, based on dates (updated)

by haukex (Archbishop)
on Nov 05, 2019 at 14:39 UTC ( [id://11108328]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    use warnings;
    ...
        }
    }
    warn "This was a dry-run, no actions performed\n" unless $RUN;
    
  2. or download this
    No match, skipping 2007_5_22_15_34_23_Table_-_2007522_XYZ_W3.pdf
    Rename x/8_2007_5_22_22_34_12_Table_-_2007522_XYZ_W3.pdf to x/Table_-_
    +2007522_XYZ_W3.pdf
    Drop x/8_2007_5_22_15_34_23_Table_-_2007522_XYZ_W3.pdf
    Rename x/8_2007_5_22_15_34_23_Table_-_2008522_XYZ_W3.pdf to x/Table_-_
    +2008522_XYZ_W3.pdf
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11108328]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2024-03-28 21:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found