mercredi 29 avril 2015

Copying multiple files into same directory while changing filename

I need to copy a series of files that look like

foo.bar
foo.baz
foo.boo
...

into the same director, but change the foo to moo.

moo.bar
moo.baz
moo.boo
...

But I'm not sure how I can copy and rename multiple files in one command. Something along the lines of

cp 'foo.*' . | ren foo.* moo.*

Except that doesn't make syntatic sense.

Aucun commentaire:

Enregistrer un commentaire