Custom Colums special extension sorting
Moderators: white, Hacker, petermad, Stefan2
Custom Colums special extension sorting
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 ...
------------------------
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 ...
------------------------
Maybe wincmd.ini parameter
will help you?
Code: Select all
SortUpper=3
Maybe you could solve this by the Multi Rename Tool?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
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
- franck8244
- Power Member
- Posts: 703
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...
This can help you...
it will split the filename into desired parts...change the separator in the lng file
Edit : link corrected
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 -
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
Use this script in the Script Content Plugin:
EDIT: oops, franck8244's solution is waaaay better
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
I switched to Linux, bye and thanks for all the fish!
What OS do you use? If you use w95/98 the feature needs at least Internet Explorer 6.0.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!
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
- franck8244
- Power Member
- Posts: 703
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...