Counter resets in every subfolder
Moderators: Hacker, petermad, Stefan2, white
Counter resets in every subfolder
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
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Counter resets in every subfolder
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.
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
https://www.ghisler.com
Re: Counter resets in every subfolder
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
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Counter resets in every subfolder
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.
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
https://www.ghisler.com
Re: Counter resets in every subfolder
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.
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
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Re: Counter resets in every subfolder
Unfortunately, freecommander can do it !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.
https://freecommander.com/en/faq-rename-multirename/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.
Re: Counter resets in every subfolder
自己用Python或者perl之类的脚本语言写个程序吧,求人不如求己。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.
我想着最近几天写一个这样的脚本,不过要文件先按目录排序。要不然会出问题。
Re: Counter resets in every subfolder
Moderator message from: white » 2024-10-21, 06:46 UTC
Translation:xiaomm250 wrote: 2024-10-21, 02:59 UTC 自己用Python或者perl之类的脚本语言写个程序吧,求人不如求己。
我想着最近几天写一个这样的脚本,不过要文件先按目录排序。要不然会出问题。
As the title of this subforum says, posts should be in English. Please use English and not Chinese.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.