Help with custom multi rename

English support forum

Moderators: Stefan2, white, sheep, Hacker

Post Reply
TomGas
Junior Member
Junior Member
Posts: 2
Joined: 2019-05-14, 08:04 UTC

Help with custom multi rename

Post by *TomGas » 2019-05-14, 08:19 UTC

Hello all,

please it is possible with TC and multi rename function to do this?

I have a multiple folders:
1000123456
1000203563
1000985231
...
Each folder have multiple files - for example folder name 1000203563:
PHOTO_980_L233_70201130
PHOTO_980_L233_70201130_2
PHOTO_980_L233_70201130_3
...

What I need, is to rename all files in folders to parent folder name like this:
1000203563
1000203563_2
1000203563_3

1000985231
1000985231_2
1000985231_3

I am fighting with CTRL+M and replace [N] with [P]_[C], but numbering does not work how I need :(
Thank you very much!

User avatar
clifford_cooley
Junior Member
Junior Member
Posts: 28
Joined: 2019-03-05, 06:04 UTC
Location: USA

Re: Help with custom multi rename

Post by *clifford_cooley » 2019-05-14, 08:35 UTC

It might help, if we understood exactly why numbering wasn't working for you. You can change how the counter increments the numbers and how many digits are used in the numbers.
License #116347

TomGas
Junior Member
Junior Member
Posts: 2
Joined: 2019-05-14, 08:04 UTC

Re: Help with custom multi rename

Post by *TomGas » 2019-05-14, 10:16 UTC

Thanks for your reply :)
Well after my noob skills and tests with CTRL+B, CTRL+A, CTRL+M and [P]_[C] rename is my result:

1000203563_0
1000203563_1
1000203563_2
1000985231_3
1000985231_4
1000985231_5
...

instead of what I need:
1000203563
1000203563_1
1000203563_2
1000985231
1000985231_1
1000985231_2
...

Thank you very much!

User avatar
clifford_cooley
Junior Member
Junior Member
Posts: 28
Joined: 2019-03-05, 06:04 UTC
Location: USA

Re: Help with custom multi rename

Post by *clifford_cooley » 2019-05-14, 12:06 UTC

Ahh, I see what you are aiming for now. Sadly I don't think the multi-rename tool will do what you are asking for. As far as I am aware the counter will increment all the files from top to bottom. Perhaps someone out there knows of a tool, or add-on that will do what you seek.

I have on many occasion used Excel (aka: spreadsheets) to create a simple command-line script. However this doesn't help unless you know how to format the command-line scripts and how to do so in a spreadsheet. If you are good with coding scripts, you can parse the folders. Instead of creating each rename line in the spreadsheet. Which also requires knowledge of how to create and use spreadsheet formulas.

Anyway it is possible to do what you are wanting. I don't know if you are willing to spend the extra time necessary to get it done the way I am referring.
License #116347

User avatar
Usher
Senior Member
Senior Member
Posts: 341
Joined: 2011-03-11, 10:11 UTC

Re: Help with custom multi rename

Post by *Usher » 2019-05-14, 13:39 UTC

TomGas wrote:
2019-05-14, 10:16 UTC
Thanks for your reply :)
Well after my noob skills and tests with CTRL+B, CTRL+A, CTRL+M and [P]_[C] rename is my result:
You don't need a counter, it's already included in filenames. Try with [P][N22-] or similar.
Regards from Poland
Andrzej P. Wozniak

User avatar
petermad
Power Member
Power Member
Posts: 8339
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Help with custom multi rename

Post by *petermad » 2019-05-14, 17:51 UTC

Try with [P][N22-] or similar.
Actually for filenames like:
PHOTO_980_L233_70201130
PHOTO_980_L233_70201130_2
it should be: [P][N24-]

You don't have to sit and count characters - just use the button marked: "[N#_#] Range" and select the last two characters
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit, 'Everything' 1.4.1.935 (x64) and TC 3.0b3 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
clifford_cooley
Junior Member
Junior Member
Posts: 28
Joined: 2019-03-05, 06:04 UTC
Location: USA

Re: Help with custom multi rename

Post by *clifford_cooley » 2019-05-14, 18:26 UTC

That is assuming the length of the name before the underscore is the same for all files.
License #116347

User avatar
ts4242
Power Member
Power Member
Posts: 2043
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: Help with custom multi rename

Post by *ts4242 » 2019-05-14, 22:46 UTC

Try these settings:

Mask: [P]_[C]
Extension: [E]
Search for: _1$
Replace with: <Clear>
^ 1x [E] RegEx Subst
Counter: start 1, step 1, digits 1

Author of Ultra TC Editors
Please support me

Post Reply