Finder out of memory

Hi
I’m relatively new to applescript and am running into a “Finder got an error: Out of memory” problem while executing :

set the list_of_all_files to (every file of the folder_name) as list 

Works fine for small numbers of files, but with 1,000s I get the error.
How do you give the ‘Finder’ more memory, or is there a better way to walk throgh a folder with a large number of files?
Thanks!
John Milton

: Hi I’m relatively new to applescript and am running
: into a “Finder got an error: Out of memory”
: problem while executing : set the list_of_all_files
: to (every file of the folder_name) as list Works
: fine for small numbers of files, but with 1,000s I get
: the error. How do you give the ‘Finder’ more
: memory, or is there a better way to walk throgh a
: folder with a large number of files? Thanks!
: John Milton
To part answer my own question, I have found that :
set num_files to count files of my_folder
repeat with file_number from 1 to num_files
set the_file to file file_number of my_folder as alias
– do stuff here
end repeat
lets me walk the folder without memory issues, but it does make the logic of the job I’m doing tougher, so I’d still be interested to know if there is a way round the ‘memory’ issue…
Thanks!
John Milton

: John, I’ve had to use GetInfo on the droplet| script
: to increase the amount of preferred memory assigned
: to the application; this app does an archive of a folder
: to a backup folder when they are dropped on it.
: Ed
Ed -
Thanks for the tip.
Increasing the amount of memory to the script application [if I understand what you are suggesting correctly] desn’t seem to help - still get the Finder out of memory error!
Thanks again
John

Oh, I forgot to mention, I had already doubled the amount
of memory my finder uses back in '95. Here is a current
article that outlines the method:
http://www.ResExcellence.com/06-04-99.shtml
Ed

Increasing the Finder’s memory partition is simple and does not require resedit.
Make a COPY of the Finder
Use applescript to change the COPY’s creator code to APPL
Select the modified file, then Get Info
Change the memory
Change the creator code back to FNDR
the above is from memory, so it may be in error
Two warnings: it takes a minute for the Finder to recognize the type of the modified Finder file has changed. You may need to close & open the folder holding the modified finder or restart.
I’ve read repeatedly that altering the Finder’s memory partition has no effect on its performance.
mg