Roman Counter in the Multiple Rename Tool

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
kgh
Junior Member
Junior Member
Posts: 5
Joined: 2008-06-12, 08:06 UTC

Roman Counter in the Multiple Rename Tool

Post by *kgh »

hi.

I use the multiple rename tool very often and would love to see an option-checkbox for a roman counter that does count and insert like:
I
II
III
IV
V
...

here is an example delphi sourcecode:

Code: Select all

function DecToRoman(Decimal: Longint): String;
const
  Romans: Array[1..16] of String = ('I', 'IV', 'V', 'IX', 'X', 'XL',
                                    'L', 'XC', 'C', 'CD', 'D', 'CM',
                                    'M', '(M)', '[M]', '{M}');
  Arabics: Array[1..16] of Integer = (1, 4, 5, 9, 10, 40, 50, 90, 100,
                                      400, 500, 900, 1000, 10000, 100000, 1000000);
var
   iFor: Integer;
begin
  Result := '';
  for iFor := 16 downto 1 do
  begin
    while(Decimal >= Arabics[iFor]) do
    begin
      Decimal := Decimal - Arabics[iFor];
      Result := Result + Romans[iFor];
    end;
  end;
end;
i can't post the web adress cause this is my first post but it is from

delphipraxis[dot]net[slash]post51339[dot]html

greetz from berlin
Konrad H.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50505
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, you can't create a content plugin for a counter. But you could write a content plugin which would convert a normal numeric value to Roman numbers. It could look e.g. for the first or last block of numbers in a file name, and then convert them to Roman. Example:
Year1976.txt -> YearMCMLXXVI.txt
Author of Total Commander
https://www.ghisler.com
kgh
Junior Member
Junior Member
Posts: 5
Joined: 2008-06-12, 08:06 UTC

Post by *kgh »

hmm sure i can also write a small standalone tool in delphi for this but i wanted it to be integrated in the multiple rename tool for not doing an extra step...

aber das scheint der herr ghisler wohl nicht zu wollen?! :-)

greetings
Konrad H.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

ntegrated in the multiple rename tool for not doing an extra step...
Well special handling for individuals are covered by plugins best.

This is the main reason for the plugin existence :
Don't bother the majority with problems of individuals, but support individuals in solving even curious tasks.
#5767 Personal license
kgh
Junior Member
Junior Member
Posts: 5
Joined: 2008-06-12, 08:06 UTC

Post by *kgh »

sqa_wizard wrote: Well special handling for individuals are covered by plugins best.

This is the main reason for the plugin existence :
Don't bother the majority with problems of individuals, but support individuals in solving even curious tasks.
hmm i agree.
only thought that this could be nice for everyone.
User avatar
Sam_Zen
Power Member
Power Member
Posts: 700
Joined: 2005-02-08, 22:59 UTC
Location: NL
Contact:

Post by *Sam_Zen »

Hmm. Don't count me in, because I prefer to use as less digits as possible. But I won't ask for hexadecimal.
0.618033988
Post Reply