How to do this with Multi-rename?
Moderators: Hacker, petermad, Stefan2, white
How to do this with Multi-rename?
Hello,
I'm a Regex noob and can figure out how to do this.
What I would like to do is search and renaming files wile searching for specific list of sequential numbers and replacing the results with another specific list of sequential numbers.
The file names to search for will contain sequential numbers like the list below, in one search:
064
065
Through.
136
Or in another search:
342
343
Through.
481
Nothing higher then three digits long.
Then I would like to change the found sequential numbers to a list like:
001
002
003
004
etc...
For both search cases.
Can this be done? and how please?
Thank you.
I'm a Regex noob and can figure out how to do this.
What I would like to do is search and renaming files wile searching for specific list of sequential numbers and replacing the results with another specific list of sequential numbers.
The file names to search for will contain sequential numbers like the list below, in one search:
064
065
Through.
136
Or in another search:
342
343
Through.
481
Nothing higher then three digits long.
Then I would like to change the found sequential numbers to a list like:
001
002
003
004
etc...
For both search cases.
Can this be done? and how please?
Thank you.
Re: How to do this with Multi-rename?
I'm afraid you have to provide more specific examples...
Do the numbers always have three digits?
Are the numbers always at the same position?
Does the rest of the file name differ for each file?
e.g.:
SomeFile_012.ext
SomeFile_427.ext
SomeFile_788.ext
is a big difference to:
Another_12_file.ext
different_file_256.ext
yet_777_another_file.ext
Re: How to do this with Multi-rename?
2Ackriss
for that specific scenario it would be enough something as follows:
Rename mask:
or (if the fourth symbol is also important; anyway, you can play here watching the renaming results preview):
Define counter [C]:
Image: https://i.imgur.com/UoILTZ6.png
for that specific scenario it would be enough something as follows:
Rename mask:
Code: Select all
[C] [N5-]
Code: Select all
[C] [N4-]
Code: Select all
Digits [3]
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Re: How to do this with Multi-rename?
Sorry for the lack of detail.
File name format is always " SomeFile_E012.ext, SomeFile_E013.ext. SomeFile_E014.ext...etc. " in sequential order, from the last set of three numbers
Then I would like to change the last set of three numbers and replace in with " SomeFile_E001.ext, SomeFile_E002.ext, SomeFile_E002.ext... etc. "
So if I have selected fifty files named " SomeFile_E213.ext, SomeFile_E214.ext " through " SomeFile_E268.ext " the the resulting fifty file names would change to " SomeFile_E001.ext, SomeFile_E002.ext " through " SomeFile_E050.ext "
Or a selected set of four files names:
"SomeFile_E322.ext" To "SomeFile_E001.ext"
"SomeFile_E323.ext" To "SomeFile_E002.ext"
"SomeFile_E324.ext" To "SomeFile_E003.ext"
"SomeFile_E325.ext" To "SomeFile_E004.ext"
The selected file always have the digits in numeral order with no missing order sequence. Always 1, 2, 3, 4 . Not 1, 2, 3, 5
The given file sets that need changing, will be copied to separate directory's before hand.
I hope I given enough info.
Thanks for the help.
File name format is always " SomeFile_E012.ext, SomeFile_E013.ext. SomeFile_E014.ext...etc. " in sequential order, from the last set of three numbers
Then I would like to change the last set of three numbers and replace in with " SomeFile_E001.ext, SomeFile_E002.ext, SomeFile_E002.ext... etc. "
So if I have selected fifty files named " SomeFile_E213.ext, SomeFile_E214.ext " through " SomeFile_E268.ext " the the resulting fifty file names would change to " SomeFile_E001.ext, SomeFile_E002.ext " through " SomeFile_E050.ext "
Or a selected set of four files names:
"SomeFile_E322.ext" To "SomeFile_E001.ext"
"SomeFile_E323.ext" To "SomeFile_E002.ext"
"SomeFile_E324.ext" To "SomeFile_E003.ext"
"SomeFile_E325.ext" To "SomeFile_E004.ext"
The selected file always have the digits in numeral order with no missing order sequence. Always 1, 2, 3, 4 . Not 1, 2, 3, 5
The given file sets that need changing, will be copied to separate directory's before hand.
I hope I given enough info.
Thanks for the help.
Re: How to do this with Multi-rename?
2Ackriss
Image: https://i.imgur.com/Cyekk8i.png
Explanation:
[N1-10] - we take the original file names and use their symbols from 1 to 10 as a new names' prefix.
[C] - we insert a counter here which starts from 1 and contains three digits.
([N11-13-] - we miss/forget three unwanted/obsolete numbering symbols from the original file names, from 11 to 13th ones)
[N14-] - we take all the rest of the meaningful symbols starting from 14 and until the end (no matter wherever it happens to be, hence 14-).
(we do not touch the extension, keeping it intact [E])
We're watching the renaming results preview, and if it looks satisfactory, we hit [Start!]
Note.
This is not a single available approach.
You can hit the [N#-#] Range big button there and may want to prefer the other ways to count symbols (from the end, in the middle, etc.)
Code: Select all
[N1-10][C][N14-]
Explanation:
[N1-10] - we take the original file names and use their symbols from 1 to 10 as a new names' prefix.
[C] - we insert a counter here which starts from 1 and contains three digits.
([N11-13-] - we miss/forget three unwanted/obsolete numbering symbols from the original file names, from 11 to 13th ones)
[N14-] - we take all the rest of the meaningful symbols starting from 14 and until the end (no matter wherever it happens to be, hence 14-).
(we do not touch the extension, keeping it intact [E])
We're watching the renaming results preview, and if it looks satisfactory, we hit [Start!]
Note.
This is not a single available approach.
You can hit the [N#-#] Range big button there and may want to prefer the other ways to count symbols (from the end, in the middle, etc.)
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Re: How to do this with Multi-rename?
Thank for the tip @Bob
I've got it figured out now.
The magic to add was:
Thanks again.
I've got it figured out now.
The magic to add was:
Code: Select all
[N1-13][C]
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Re: How to do this with Multi-rename?
What about
Just take the whole name but the last 4 and add a 3-digit counter
Code: Select all
[N1--4][C:3]
#5767 Personal license
Re: How to do this with Multi-rename?
2Ackriss
You are welcome.
Your example is comparably predictable.
Had your files been not that positionally consistent (see the ZoSTeR's examples), we would have had much more fun here.
Cheers.
You are welcome.
Your example is comparably predictable.
Had your files been not that positionally consistent (see the ZoSTeR's examples), we would have had much more fun here.
Cheers.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Re: How to do this with Multi-rename?
This is another good practical example. Thank you.sqa_wizard wrote: 2024-01-30, 22:22 UTCJust take the whole name but the last 4 and add a 3-digit counterCode: Select all
[N1--4][C:3]
If the Ackriss's files weren't that consistent (had prefixes of different lengths before the numbering part but at the same time went without random suffixes thereafter) it would be the main solution.
Last edited by beb on 2024-01-30, 22:48 UTC, edited 1 time in total.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Re: How to do this with Multi-rename?
I'm bookmaking this for further reference. Because of the great tips i have received.
Many Thanks to @Bob And @sqa_wizard.
Edit: I'm Sorry @ "Beb" I have been calling you Bob. glasses must have been dirty. my mistake, sorry.
Many Thanks to @Bob And @sqa_wizard.
Edit: I'm Sorry @ "Beb" I have been calling you Bob. glasses must have been dirty. my mistake, sorry.
Re: How to do this with Multi-rename?
Not to be nitpicky, but to make it more understandable why "-4":sqa_wizard wrote: 2024-01-30, 22:22 UTC What aboutJust take the whole name but the last 4 and add a 3-digit counterCode: Select all
[N1--4][C:3]
[N1--4] should be translated as: Take the first to the fourth last character.
Re: How to do this with Multi-rename?
It ain't a big deal, never mind. What matters is the solution you have found.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15