Finding a large number of files - ls vs file_search? [message #77109] |
Tue, 09 August 2011 01:56  |
rjp23
Messages: 97 Registered: June 2010
|
Member |
|
|
I have ascii output from some code that numbers in the tens of
thousands of files (e.g. 60,000).
I want to read these in in IDL, check the result and only select the
files where the result meets a certain condition.
I have this all coded up and it works fine for smaller sets of data
but it can take a long long time for file_search to return a result
when searching 60,000 files.
My question is would it be more efficient to spawn an ls command or
something else rather than using file_search within IDL?
Cheers
Rob
|
|
|
Re: Finding a large number of files - ls vs file_search? [message #77422 is a reply to message #77109] |
Wed, 31 August 2011 05:08  |
rogass
Messages: 200 Registered: April 2008
|
Senior Member |
|
|
On 9 Aug., 10:56, Rob <rj...@le.ac.uk> wrote:
> I have ascii output from some code that numbers in the tens of
> thousands of files (e.g. 60,000).
>
> I want to read these in in IDL, check the result and only select the
> files where the result meets a certain condition.
>
> I have this all coded up and it works fine for smaller sets of data
> but it can take a long long time for file_search to return a result
> when searching 60,000 files.
>
> My question is would it be more efficient to spawn an ls command or
> something else rather than using file_search within IDL?
>
> Cheers
>
> Rob
Hi Rob,
just try the /no_sort keyword for file_search. Now it's fast, I
think :)
Cheers
CR
|
|
|