0

I'm trying to rename a bunch of files, using the rename command, from

Blue - This file is called Blue ok.txt
Red - This file is called Red ok.txt
Orange and Yellow - This file is called Orange and Yellow ok.txt

... into:

Blue.txt
Red.txt
Orange and Yellow.txt

I'm having trouble getting it to understand the wildcard in the middle. I've tried:

rename -f 's/ - This file is called* ok//gi' *.txt
5

0

You must log in to answer this question.

Browse other questions tagged .