Hi all,
A (hopefully) small question:
I have loads of filenames which are formed like this:
word1 word2 - something_else.txt
I would like to change them into:
word2, word1 - something_else.txt
How (and where) can I do this, i.e. switch word1 and word2, and put a comma in between?
Thanks!
Regular pattern in filename: how to implement?
-
- Posts: 23
- Joined: 27.04.2015, 15:08
Re: Regular pattern in filename: how to implement?
Use Multi rename (Ctrl+M):
-
- Posts: 23
- Joined: 27.04.2015, 15:08
Re: Regular pattern in filename: how to implement?
Thanks, Jody, but I think I wasn't sufficiently "general" in my original post. I think your method only works when you know the exact length of the things you want to switch - but I don't know that length.
Obviously, "word1" and "word2" are just placeholders. I would like to turn
Jack Jones - something1.txt
Emmanuel Williamson - somethingdifferent.txt
into
Jones, Jack - something1.txt
Williamson, Emmanuel - somethingdifferent.txt
So I suppose some regex will be required, but I don't have a clue about those things...
Any help would be very much appreciated.
Obviously, "word1" and "word2" are just placeholders. I would like to turn
Jack Jones - something1.txt
Emmanuel Williamson - somethingdifferent.txt
into
Jones, Jack - something1.txt
Williamson, Emmanuel - somethingdifferent.txt
So I suppose some regex will be required, but I don't have a clue about those things...
Any help would be very much appreciated.
-
- Posts: 23
- Joined: 27.04.2015, 15:08
Re: Regular pattern in filename: how to implement?
Got it!
- Use "Multirename" (duh)
- Tick "Regular expression"
- in "Search for", put: ([a-z]+) ([a-z]+)
- in "Replace with", put: $2, $1
This turns
Ernest Hemingway - The Old Man and the Sea.txt
into
Hemingway, Ernest - The Old Man and the Sea.txt
Maybe it needs some finetuning, but for me it works.
- Use "Multirename" (duh)
- Tick "Regular expression"
- in "Search for", put: ([a-z]+) ([a-z]+)
- in "Replace with", put: $2, $1
This turns
Ernest Hemingway - The Old Man and the Sea.txt
into
Hemingway, Ernest - The Old Man and the Sea.txt
Maybe it needs some finetuning, but for me it works.
Re: Regular pattern in filename: how to implement?
Nice job!
P.S. don't forget the numbers if you want your first example to work...
([a-z0-9]+) ([a-z0-9]+)
P.S. don't forget the numbers if you want your first example to work...
([a-z0-9]+) ([a-z0-9]+)
Who is online
Users browsing this forum: No registered users and 28 guests