Re: Determine if a filename exists in a LARGE folder
Re: Determine if a filename exists in a LARGE folder
- Subject: Re: Determine if a filename exists in a LARGE folder
- From: Shane Stanley <email@hidden>
- Date: Thu, 14 Jun 2001 08:56:37 +1000
On 14/6/01 2:41 AM +1000, Matthew Broms, email@hidden, wrote:
>
I was going to get a list of filenames in a designated folder and see if
>
this list contained "xyz" filename (easy - works well). The problem is that
>
this folder is 11 gigabytes in size and currently contains 42,225 items in
>
it. Getting a list this size is rather slow and the list is VERY large
>
given such a large folder (and there is no way I'm able to break this folder
>
down into more manageable sub-folders since this folder is referenced by 3+
>
Indigo printers). Does anyone know how to efficiently (that is, reasonably
>
fast) check for the mere existence of a filename in such a large folder? My
>
experience is that the Mac OS Finder doesn't deal very quickly with folders
>
that have such a large number of files. Doing a straight reference to the
>
file directly is slow too - in a try statement I did a "set test to info for
>
alias fileNamePath" and set it to a default signature on error. This worked
>
properly, but just crawled along. Any suggestions?
Have you tried asking the Finder "exists file filePath"?
--
Shane Stanley, email@hidden