[Req] Multy Rename Content plugin request
Moderators: Hacker, petermad, Stefan2, white
[Req] Multy Rename Content plugin request
I would like to have a content plugin acting like a Multy Rename Tool, but without actual files renaming. I'd like it to send the result name to the content field. I think Christian has already all the needed code and it would be easy for him to write such a plugin. The only thing is to decide how to store/pass renaming parameters to the plugin. May be to use the plugin's ini file or to get last renaming parameters from the wincmd.ini, or to make some interface similar to the Multy Rename Tool...
2Lev
This feature already exists in a limited manner: You can define substrings for custom columns:
Example 1 (will give you the first 20 chars of the path and the last 20 chars of the (full) filename, delimited by the literal " ... "):
Example 2 (will give you the first character ("N" or "Y") of a "No" / "Yes" field):
(Example 2 doesn't deal with filenames = useless example)
Probably not the full featured solution you have suggested...
Regards, van Dusen
This feature already exists in a limited manner: You can define substrings for custom columns:
Code: Select all
[=Pluginname.Fieldname.Unit:{substr params}]
Code: Select all
[=tc.Pfad:1,20] ... [=tc.Voller Name:-20-]
Code: Select all
[=streams.HasStreams:1]
Probably not the full featured solution you have suggested...
Regards, van Dusen
2 sheepdogI want to sort files in a desired order without a real remnaming for example file1, fille10, file2 can be sorted in needed order and so on
2 van DusenThank you very much for the tip. I didn't find the tip about last letters of a field contents in the Help file. I think the help should be corrected.
2 van DusenThank you very much for the tip. I didn't find the tip about last letters of a field contents in the Help file. I think the help should be corrected.
2 van Dusen Unfortunately the column is sorted by it's unmodified parent
I've created 3 files:aaa037.txt, bbb105.txt, ccc005.txt and created a custom column: [=tc.name:-3-] (3 last letters) so I see only 037, 105, 005 as I want, but when I'm trying to sort files by the column result, they are sorted by unrestricted [=tc.name] order
Is it a bug or a feature?
I've created 3 files:aaa037.txt, bbb105.txt, ccc005.txt and created a custom column: [=tc.name:-3-] (3 last letters) so I see only 037, 105, 005 as I want, but when I'm trying to sort files by the column result, they are sorted by unrestricted [=tc.name] order

Is it a bug or a feature?
2Lev
You are right... unfortunately TC always sorts by the full value. This is by design, as Mr. Ghisler wrote in this posting (on the german board).
My bad translation:
"Yes, sorting is always done by the full value. Reason: That way you can display substrings from numeric values too - but for sorting this would be rather inexpedient"
If you need a user defined sort order of files, you can use another workaround... I'll try to find the appropriate thread... stay tuned!
*** EDIT - Begin ***
I've found it: *click*
This solution may not meet your reqirement, because
* it doesn't use a substring of a given filename (as sort key)
* you can't select multiple files to apply ascending sort key for each file of the selection automatically
Maybe it's possible to modify the DOS batch to solve these problems...
*** EDIT - End ***
Regards, van Dusen
You are right... unfortunately TC always sorts by the full value. This is by design, as Mr. Ghisler wrote in this posting (on the german board).
My bad translation:
"Yes, sorting is always done by the full value. Reason: That way you can display substrings from numeric values too - but for sorting this would be rather inexpedient"
If you need a user defined sort order of files, you can use another workaround... I'll try to find the appropriate thread... stay tuned!

*** EDIT - Begin ***
I've found it: *click*
This solution may not meet your reqirement, because
* it doesn't use a substring of a given filename (as sort key)
* you can't select multiple files to apply ascending sort key for each file of the selection automatically
Maybe it's possible to modify the DOS batch to solve these problems...
*** EDIT - End ***
Regards, van Dusen
OK, I had to write myself a shortened, buggy version of a desired plugin - Regexp Content plugin. Hope it would be useful for anybody else. 

Don't you know that INI-Setting? Look in wincmd.ini section of TC help.Sorry, but I didn't understand what did you mean by "SortUpper=2" is it like in [file1->file01] section or something else?
Yes, it's file1 -> file01. With your plugin I can now have SortUpper=0 by default and have a separate column with "emulated" SortUpper=2 sort order. So, very useful for me.
Icfu
This account is for sale
Thanks for your explanation. There is a bug in a Help file, it is written: "2: Uses mixed lexical and numerical sorting, e.g. file10.txt comes AFTER file1.txt" instead of "AFTER file2.txt" (file10.txt comes after file1.txt with any sorting method), so I didn't understand the usefullness of that key and forgot about it's existance.
Note that [file1->file01] woud not work with files like file3.txt, file22.txt and file101.txt, it reguires another regexp, and I'm not a guru in their creation
Note that [file1->file01] woud not work with files like file3.txt, file22.txt and file101.txt, it reguires another regexp, and I'm not a guru in their creation

Yep, should read "comes AFTER file2.txt".
Regarding your plugin:
There is an EEDFADE exception when a non existing section is linked in [mrc].
The problem here is that your plugin seems to ignore the second section so it doesn't work. Each of the sections work flawlessly when the other one is disabled.
Icfu
Regarding your plugin:
There is an EEDFADE exception when a non existing section is linked in [mrc].
I am using two sections now:Note that [file1->file01] woud not work with files like file3.txt, file22.txt and file101.txt, it reguires another regexp, and I'm not a guru in their creation
Code: Select all
[mrc]
section=Add One Leading Zero
section=Add Two Leading Zeros
[Add One Leading Zero]
Find="(.+)\s(\d{2})$"
Change="$1 0$2"
Substitute=1
Others=1
[Add Two Leading Zeros]
Find="(.+)\s(\d)$"
Change="$1 00$2"
Substitute=1
Others=1
Icfu
This account is for sale
Yes, as I wrote in readme - Very initial, very buggy 
Plugin does not support several columns yet (there is a workaround written on a plugin page) and does not support several sections at once. (I wonder if any program can support an ini file with 2 keys in the same section with a same name)
I think a new combined regexp shoulld be written for adding leading zeros or a separate plugin which would be devoted only to this problem alone.

Plugin does not support several columns yet (there is a workaround written on a plugin page) and does not support several sections at once. (I wonder if any program can support an ini file with 2 keys in the same section with a same name)
I think a new combined regexp shoulld be written for adding leading zeros or a separate plugin which would be devoted only to this problem alone.