Counter resets in every subfolder

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Counter resets in every subfolder

Post by *yahuu »

When I enter the branch view by pressing Ctrl+B and select all files to rename, I hope to set the counter based on the folder where each file is located.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Counter resets in every subfolder

Post by *ghisler(Author) »

Unfortunately this isn't feasible: Currently each name can be determined independently from all others. For your suggestion, changing the rename string would make it necessary to recalculate the names of ALL files in the list, which could as well be a few million. It would make the tool unusable.

What you can do instead is to not use a counter - then you will get an error when there is a name collision, and you will get the option to automatically rename files to filename (2).ext, filename (3).ext etc.
Author of Total Commander
https://www.ghisler.com
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: Counter resets in every subfolder

Post by *yahuu »

Perhaps I didn't describe it clearly,I am referring to the [C] parameter of the multirename tool.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Counter resets in every subfolder

Post by *ghisler(Author) »

That's clear to me! Imagine you want to rename 2 million files in 10000 subdirectories. The preview is at the end of the list. Now you change something in the "File name" field, e.g. [N] to [C] [N].
Current situation:
To determine the names in the list, TC just needs the current file name and its line number. Instantaneous display.
Your suggestion:
TC needs to determine the position of the file in its subdirectory. It has to go through all 2 million files above the current position to get this number.
Author of Total Commander
https://www.ghisler.com
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: Counter resets in every subfolder

Post by *yahuu »

In practical operations, there are rarely opportunities to handle 2 million files at the same time. In the current version, there is already a lag when renaming 60,000 files.

tcimg can reset the counter for the folder it is in, and free commander also has this feature.

Is it possible to set a parameter, such as making this function unavailable when the total exceeds 20,000?

This kind of function is still encountered frequently, and currently, the only option is to enter each folder and operate one by one.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
xiaomm250
Junior Member
Junior Member
Posts: 25
Joined: 2021-12-03, 09:43 UTC

Re: Counter resets in every subfolder

Post by *xiaomm250 »

ghisler(Author) wrote: 2024-10-17, 06:49 UTC Unfortunately this isn't feasible: Currently each name can be determined independently from all others. For your suggestion, changing the rename string would make it necessary to recalculate the names of ALL files in the list, which could as well be a few million. It would make the tool unusable.

What you can do instead is to not use a counter - then you will get an error when there is a name collision, and you will get the option to automatically rename files to filename (2).ext, filename (3).ext etc.
Unfortunately, freecommander can do it !
Is it possible to rename multiple files and/or folders from different locations?

Yes, you can use Plain view (Ctrl+B), or File container, to display the files/folders from different locations, then select the items you want to rename and press F2 or Ctrl+M.
Note: If you want to use the Counter, use option “Reset per folder”, if you want it to start from the same number (1) in each folder.
https://freecommander.com/en/faq-rename-multirename/
xiaomm250
Junior Member
Junior Member
Posts: 25
Joined: 2021-12-03, 09:43 UTC

Re: Counter resets in every subfolder

Post by *xiaomm250 »

yahuu wrote: 2024-10-20, 16:54 UTC In practical operations, there are rarely opportunities to handle 2 million files at the same time. In the current version, there is already a lag when renaming 60,000 files.

tcimg can reset the counter for the folder it is in, and free commander also has this feature.

Is it possible to set a parameter, such as making this function unavailable when the total exceeds 20,000?

This kind of function is still encountered frequently, and currently, the only option is to enter each folder and operate one by one.
自己用Python或者perl之类的脚本语言写个程序吧,求人不如求己。
我想着最近几天写一个这样的脚本,不过要文件先按目录排序。要不然会出问题。
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Counter resets in every subfolder

Post by *white »

Moderator message from: white » 2024-10-21, 06:46 UTC

xiaomm250 wrote: 2024-10-21, 02:59 UTC 自己用Python或者perl之类的脚本语言写个程序吧,求人不如求己。
我想着最近几天写一个这样的脚本,不过要文件先按目录排序。要不然会出问题。
Translation:
Write a program yourself using a scripting language like Python or Perl. It is better to rely on yourself than on others.
I was thinking about writing such a script in the next few days, but the files must be sorted by directory first. Otherwise, there will be problems.
As the title of this subforum says, posts should be in English. Please use English and not Chinese.
Post Reply