comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » parse subdirectories
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: parse subdirectories [message #94261 is a reply to message #94260] Wed, 15 March 2017 11:23 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le mercredi 15 mars 2017 16:02:42 UTC+1, Helder a écrit :
> On Tuesday, March 14, 2017 at 12:04:15 AM UTC+1, Helder wrote:
>> Thanks for the insight Wayne.
>> I think I will go for the sort/count slashes option. Otherwise programming is no fun.
>> Cheers, Helder
>
> Ok,
> so I managed this and it is working fine. The improvement is there: crawling through 2000 sub-directories takes ~9 seconds against the >14 sec with the old file_search method.
> Now the time to execute is limited by the spawn command (8.5 sec), whereas before it was limited by the file_search (13 sec).
> If anybody requests it and I have time I'll put the code together in a "nicer" way.
> Cheers,
> Helder

Maybe you could simply reorder your string array first by using SORT ?

print, result[sort(result)]

K:\data\sub-1\2002                        
K:\data\sub-1\2002\02_01_26              
K:\data\sub-1\2002\02_01_28              
K:\data\sub-1\2004                        
K:\data\sub-1\2004\04_12_02              
K:\data\sub-1\2004\04_12_03              
K:\data\sub-1\2005                        
K:\data\sub-1\2017                        
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Harris seems to be deemphasizing IDL
Next Topic: Problem writing SCATTERPLOT() with more than 4096 points to PDF file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:00:18 PDT 2025

Total time taken to generate the page: 0.00371 seconds