Multi Rename Tool - changing the dots into spaces
Moderators: Hacker, petermad, Stefan2, white
Multi Rename Tool - changing the dots into spaces
How do I change file names from "Filename.Divided.Into.Multiple.Bits.v1.80.plus.nonsense" to "Filename Divided Into Multiple Bits v1.80" with the multi rename tool in just one go? At the moment I'm either renaming all files by hand, or changing the dots into spaces and then correcting the errors but I suspect this could be done with a clever reg expr statement that will only turn dots into spaces in certain instances and remove particular phrases. Can this be actually done?
Last edited by ymmv on 2005-01-24, 20:03 UTC, edited 1 time in total.
Re: Multi Rename Tool - How do I do this question
In the generic case, as far as my regular expression knowledge goes, it is not possible.ymmv wrote:How do I change file names from "Filename.Divided.Into.Multiple.Bits.v1.80.plus.nonsense" to "Filename Divided Into Multiple Bits v1.80" with the multi rename tool in just one go? At the moment I'm either renaming all files by hand, or changing the dots into spaces and then correcting the errors but I suspect this could be done with a clever reg expr statement that will only turn dots into spaces in certain instances and remove particular phrases. Can this be actually done?
I mean, I tried to come up with some regular expression that would solve this, but I failed.

Conceptually it is easy: you have to match all dots that follow something else than the sequence "v\d" ("v" followed by digit, maybe v can be uppercase as well) and replace them by space.
Unfortunately I don't know if this is possible with regular expressions.
If somebody is a regexp guru, it would be very instructive to post a solution to this (if it's solvable).
Re: Multi Rename Tool - How do I do this question
search forszlori wrote:In the generic case, as far as my regular expression knowledge goes, it is not possible.ymmv wrote:How do I change file names from "Filename.Divided.Into.Multiple.Bits.v1.80.plus.nonsense" to "Filename Divided Into Multiple Bits v1.80" with the multi rename tool in just one go?
I mean, I tried to come up with some regular expression that would solve this, but I failed.![]()
Conceptually it is easy: you have to match all dots that follow something else than the sequence "v\d" ("v" followed by digit, maybe v can be uppercase as well) and replace them by space.
Unfortunately I don't know if this is possible with regular expressions.
If somebody is a regexp guru, it would be very instructive to post a solution to this (if it's solvable).
\.\D
replace with
$1
note that there is an empty space before the $1!!!
and regex checked
What it does, it matches every dot not followed by a number (i.e. every dot followed by any character except a number)
Then replaces the dot and the character which is not a number with a space and the same character.
The problem is that also removes the dot before the extension, so the proper extension is lost. I'm not aware of a way to do search/replace on a filename only, without extension
Re: Multi Rename Tool - How do I do this question
Well, there you go. If you put the problem in different (easier) way in words, the solution could be much simpler!What it does, it matches every dot not followed by a number (i.e. every dot followed by any character except a number)
Then replaces the dot and the character which is not a number with a space and the same character.
The problem is that also removes the dot before the extension, so the proper extension is lost. I'm not aware of a way to do search/replace on a filename only, without extension

2ymmv
Easy - Mark your files - Enter the MultiRename Tool and Enter the following:
Search For: ".| plus nonsense"
Replace By " |"
(without "")
Because Thanks To tcv6.50 you can now search
and replace for as many things as u like in one
step - Just remember to devide them with "|"
(without "")
Easy - Mark your files - Enter the MultiRename Tool and Enter the following:
Search For: ".| plus nonsense"
Replace By " |"
(without "")
Because Thanks To tcv6.50 you can now search
and replace for as many things as u like in one
step - Just remember to devide them with "|"
(without "")
Hoecker sie sind raus!
Hi Sir_SiLvA.
Thanks for thinking along with me. Unfortunately your solution also removes the dots of the version number, so I'd end up with somethinng like "Filename Divided into Multiple Bits v 1 80".
It's too bad you can't chain rename commands in TC, that would have solved it a lot quicker I'd guess.
Thanks for thinking along with me. Unfortunately your solution also removes the dots of the version number, so I'd end up with somethinng like "Filename Divided into Multiple Bits v 1 80".
It's too bad you can't chain rename commands in TC, that would have solved it a lot quicker I'd guess.
Did you put $1 after the space in the replace box?ymmv wrote:Hi Solid,
I tried your solution too but that would leave me with "Filename ivided nto ultiple its 1.80 lus"
After searching for "\.(\D)" and replacing it with " $1", the result is:
Filename Divided Into Multiple Bits v1.80 plus nonsense
if you put an extra dot in the extension field
".[E]"
you will end up with
Filename Divided Into Multiple Bits v1.80 plus .nonsense
Sorry i have forgotten that than you have it to do thios way:ymmv wrote:Hi Sir_SiLvA.
Thanks for thinking along with me. Unfortunately your solution also removes the dots of the version number, so I'd end up with somethinng like "Filename Divided into Multiple Bits v 1 80".
It's too bad you can't chain rename commands in TC, that would have solved it a lot quicker I'd guess.
Search For: ".| plus nonsense|v1 "
Replace By " ||v1."
Hoecker sie sind raus!
Last edited by white on 2005-02-01, 19:04 UTC, edited 3 times in total.
Thanks for the suggestions so far! I've now settled on a two-pronged attack. First
"\.(\D)|(PHRASE1|PHRASE2|PHRASE3|ETC)" and " $1"
Then F5 and F2 to select the next search and replace command
" " (two spaces) and "."
That seems to work fine so far. I haven't yet experimented with White's suggestion, I'll check that out tomorrow.
"\.(\D)|(PHRASE1|PHRASE2|PHRASE3|ETC)" and " $1"
Then F5 and F2 to select the next search and replace command
" " (two spaces) and "."
That seems to work fine so far. I haven't yet experimented with White's suggestion, I'll check that out tomorrow.
