• 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
Problem getting files by file type or extension
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem getting files by file type or extension


  • Subject: Problem getting files by file type or extension
  • From: Steve Mills <email@hidden>
  • Date: Thu, 04 Dec 2008 09:51:20 -0600

I was wondering if this situation looks familiar to anyone, and if there's a known problem or workaround. I'm writing a script for a customer that batch processes documents stored in subfolders of a main folder. The script asks Finder for all MultiAd Creator documents like so:

set creatorFiles to (get every file of fold whose (file type is "Crtr" or name ends with ".crtr"))

"fold" is a Finder "folder" object reference. This line always works on my Mac. On the customer's Mac, it will seem to work for several subfolders, and then generate this error for some subfolders that - as far as I've been told - do have Creator documents in them:

	Finder got an error: Can't make some data into the expected type.

"fold" is generated before the main loop by this line:

	set fold to folder (get item i of foldNames) of mainFold

Again, this is using Finder objects, and both lines are within Finder tell blocks. The customer's OS is 10.3.9 (ewww). Mine's 10.5.5.

There might something that the customer isn't telling me, as I get the feeling he's not too swift (replies with one short answer when I asked three questions, says "Creator crashed" when what really happened was the script processed all subfolders and generated the appropriate error log, stuff like that).

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: Renaming multiple files
  • Next by Date: Re: How does one add a sub-topic (or sub-sub-topic, or sub-sub-sub-topic) to an InDesign index?
  • Previous by thread: Re: Comparing version strings
  • Next by thread: RE: Problem getting files by file type or extension
  • Index(es):
    • Date
    • Thread