Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Removing characters in a file name

by jwkrahn (Abbot)
on Apr 23, 2020 at 03:11 UTC ( [id://11115924]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Removing characters in a file name
in thread Removing characters in a file name

for my $file ( <*.mp4> ) { if ( $file =~ /-\s*(\d+)\s*-/ ) { rename $file, "[Books] $1.mp4" or die "Cannot rename '$file' b +ecause: $!"; } }

Replies are listed 'Best First'.
Re^6: Removing characters in a file name
by andy2020 (Initiate) on Apr 23, 2020 at 03:28 UTC

    Thanks a lot. It's working now

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found