MRT Counter Reset By Folder

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
Alonzo Mosley
Junior Member
Junior Member
Posts: 36
Joined: 2018-03-28, 20:13 UTC

MRT Counter Reset By Folder

Post by Alonzo Mosley »

Dear Internet:

I have about 1500 photos stored in a few dozen folders.

I'd like to rename each photo with the name of the folder, and then a counter:

/APPLES/DSC5675.jpg becomes /APPLES/APPLES-001.jpg
/APPLES/DSC5678.jpg becomes /APPLES/APPLES-002.jpg
/BANANAS/DSC5677.jpg becomes /BANANAS/BANANAS-001.jpg
/CABBAGE/2019-08-05-132347.jpg becomes /CABBAGE-001.jpg


So I:
* Launched TC
* Selected the parent folder
* Hit Ctrl-B to get all child files
* Hit Ctrl-A to select em all
* Hit Ctrl-M to launch MRT
* Changed the Rename Mask file name to "[P] - [C]"
* Set "Digits" to 3

Which almost gives me what I want. It numbers ALL files sequentially, in the sort order:
/CABBAGE/2019-08-05-13234.jpg became /CABBAGE/CABBAGE-001.jpg
/APPLES/DSC5675.jpg became /APPLES/APPLES-002.jpg
/BANANAS/DSC5677.jpg became /BANANAS/BANANAS-003.jpg
/APPLES/DSC5678.jpg became /APPLES/APPLES-004.jpg

Is there any way to get it to reset the counter for each folder (without going into each as a separate renaming event)?

Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.

Junior Member
Junior Member
Posts: 5
Joined: 2004-09-14, 09:20 UTC

Re: MRT Counter Reset By Folder

Post by chfaure »

As far as i know, Total commander does not have any reset counter expression.
You can do it folder by folder with TC..

Use external tools like :
Bulk Rename Utility Which have this exact feature
Advanced Renamer Using scripting
and some other...
A more complicated way would be to use a dedicated content plugin which have to be created ;)

Post Reply