Advertisement

05.21.2008 at 12:29PM PDT, ID: 23422193
[x]
Attachment Details

Rename Multiple files in linux Using a WILDCARD

Asked by jags2ooo in Linux

HI!!!!!!   I have files named
-Abc-Galaxy Angel-[LIME]_Galaxy_Angel_1.mkv

through

-Abc-Galaxy Angel-[LIME]_Galaxy_Angel_26.mkv

would like to rename them to
[LIME]_Galaxy_Angel_1.mkv
[LIME]_Galaxy_Angel_26.mkv


How would i do this  in linux? I tried using a perl command that i usual use but it keeps prompting me with a error i think its cause of the -A infront of the file name.

The command i tried was

perl -e '($r=$_)=~s/\-Abc-Galaxy Angel-[LIME]/[LIME]/ && rename $_,$r for @ARGV' *.mkv

THE ERROR:
Unrecognized switch: -Abc-Galaxy Angel-[LIME]_Galaxy_Angel_07.mkv Start Free Trial
[+][-]05.21.2008 at 12:39PM PDT, ID: 21618327

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.21.2008 at 12:42PM PDT, ID: 21618357

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 12:48PM PDT, ID: 21618404

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628