• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using the entire contents command and getting Memory Error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the entire contents command and getting Memory Error


  • Subject: Re: Using the entire contents command and getting Memory Error
  • From: "Marc K. Myers" <email@hidden>
  • Date: Tue, 26 Jun 2001 08:22:00 -0400
  • Organization: [very little]

> Date: Fri, 22 Jun 2001 19:31:44 -0500
> To: email@hidden
> From: "Richard K. Russell" <email@hidden>
> Subject: Using the entire contents command and getting Memory Error
>
> I have written a script to get the complete path names to the entire
> contents of a CD. I am using the entire contents command and getting
> the following error "Finder got an error: because *0x//*there isn't
> enough memory available. Closing windows or quitting application
> programs can make more memory available." Here is the code that I am
> using and getting the above error.
>
> -- Gets the content of Disc or Folder
> tell application "Finder"
> set indexFolder to choose folder
> set x to entire contents of folder indexFolder
> end tell
>
> I am looking for solution to manage the the size of the x. There
> could be as many as 5000 files on a disk.

Theoretically, if your script is an applet you could allocate enough
memory to it to contain such a huge list. But - the "entire contents
of" reference form is buggy, so you're likely to not get what you're
asking for, and there's a better approach.

The free Akua Sweets scripting addition has a "the entries in" command
that performs the same function, is reliable, and much more flexible.
It allows you to limit the number of hits in a call and to pick up from
that point in a later call, so you could get your data in manageably
sized chunks in a loop. It will also return your results in a number of
formats, so you could get aliases or text paths, rather than Finder file references.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[6/26/01 8:21:14 AM]


  • Prev by Date: scripting QuickTime
  • Next by Date: Re: Migrating scripting additions to Mac OS X
  • Previous by thread: Using the entire contents command and getting Memory Error
  • Next by thread: Folder Actions on Subfolders?
  • Index(es):
    • Date
    • Thread