Custom Colums special extension sorting

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Zestje
Junior Member
Junior Member
Posts: 3
Joined: 2006-02-13, 19:42 UTC

Custom Colums special extension sorting

Post by *Zestje »

Hello all,

I'm looking for a way to sort files from Pro/Engineer in TC.
The problem is that the program uses a stupid naming system, where the version of the part is counted seperately after the extension like this:

part1.prt.1
part1.prt.2
part1.prt.3
part1.prt.4
part1.prt.5
...
part1.prt.999

and

assembly1.asm.1
assembly1.asm.2
assembly1.asm.3
assembly1.asm.4
assembly1.asm.5
....
assembly1.asm.999

When I want to sort acc. to extension (prt, asm, sec) I get the wrong order because of the numbering.

So, is there a way to achieve a sort acc. to the 'real' extension? Preferable by using 'custom colums'?
I tried but unfortuntely there is no customizable filter that would allow sorting like e.g. acc. to the 'first extension'. It would be great to have some kind of regular expression option to define custom colums.
then you could sort acc. to any character or number or whatever...

Does anyone have a good idea to get this feature :?: I couldn't find a solution with the search function. Thanks in advance!

----------------------------------
Just a side note: The numbering is also irritating, because it generates only the number of digits needed instead of always 3 digits, so when you do a normal sort acc. to extension you get e.g.

....
assembly1.asm.1
assembly1.asm.10
assembly1.asm.11
assembly1.asm.2
assembly1.asm.3
assembly1.asm.4
assembly1.asm.5
assembly1.asm.6
assembly1.asm.7
assembly1.asm.8
assembly1.asm.9

But that's a different problem to solve ... :?
------------------------
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Try to add to wincmd.ini file ([Configuration] section) line
SortUpper=2
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

Maybe wincmd.ini parameter

Code: Select all

SortUpper=3
will help you?
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Just a side note: The numbering is also irritating, because it generates only the number of digits needed instead of always 3 digits, so when you do a normal sort acc. to extension you get e.g.

....
assembly1.asm.1
assembly1.asm.10
assembly1.asm.11
assembly1.asm.2
assembly1.asm.3
assembly1.asm.4
assembly1.asm.5
assembly1.asm.6
assembly1.asm.7
assembly1.asm.8
assembly1.asm.9

But that's a different problem to solve ... Confused
Maybe you could solve this by the Multi Rename Tool?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Zestje
Junior Member
Junior Member
Posts: 3
Joined: 2006-02-13, 19:42 UTC

Post by *Zestje »

This 'SortUpper' doesn't seem to do anyting at all? Not even after restarting TC??

And I don't want to rename, because Pro/E wouldn't be able to find the files anymore unless I always rename them back...

but tnx so far!
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Both SortUpper=2 and SortUpper=3 changes the way TC sorts the files with the above names. It sorts them in "natural" order.
When I change it to SortUpper=0 it sorts the files alphabetically.

Maybe you change wrong ini file, or you have this line twice in the file?
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

This can help you...
it will split the filename into desired parts...change the separator in the lng file ;)

Edit : link corrected
Last edited by franck8244 on 2006-02-13, 21:59 UTC, edited 1 time in total.
TC#88260 -
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

2franck8244
Correct the link, please.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Use this script in the Script Content Plugin:

Code: Select all

'ProEngineer.vbs by SanskritFritz

'Script for Script Content Plugin
'(c)Lev Freidin, 2005
'http://www.totalcmd.net/plugring/script_wdx.html
'http://wincmd.ru/plugring/script_wdx.html
'
'This script shows the "second extension" of a file

content = ""

Dim fso
Set fso = CreateObject( "Scripting.FileSystemObject" )
content = fso.GetBaseName( filename )
content = fso.GetExtensionName( content )

Set fso = nothing
EDIT: oops, franck8244's solution is waaaay better :-)
I switched to Linux, bye and thanks for all the fish!
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

2Zestje
Sorry, I've read your post once again - more carrefully - my answer was only for the last note (about numbering).
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Zestje wrote:This 'SortUpper' doesn't seem to do anyting at all? Not even after restarting TC??

And I don't want to rename, because Pro/E wouldn't be able to find the files anymore unless I always rename them back...

but tnx so far!
What OS do you use? If you use w95/98 the feature needs at least Internet Explorer 6.0.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Zestje
Junior Member
Junior Member
Posts: 3
Joined: 2006-02-13, 19:42 UTC

Post by *Zestje »

Ok! It works!

The SortUpper solved the number sorting problem, and I found the FileX plugin, which I used to create groups for the different extensions. By adding a custom column sorting acc. to Pro/E file type now works :D

Thank you all for your help :!: :!:
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

2franck8244
BTW: Are you author of this plugin?
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2franck8244
BTW: Are you author of this plugin?
Yes, but it was a long long time ago ;)
TC#88260 -
Post Reply