• 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
Get a list of folders and then get told the items in the list don't exist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get a list of folders and then get told the items in the list don't exist


  • Subject: Get a list of folders and then get told the items in the list don't exist
  • From: Steve Thompson <email@hidden>
  • Date: Mon, 6 Oct 2003 15:35:15 +0100

Can someone tell me what I've done wrong here? Should be a simple
script but I keep getting an error and I can't see why. Basically this:

tell application "Finder"
set these_items to every folder of folder "test Master Database" of
disk "test"
repeat with i from 1 to the count of these_items
set this_item to (item i of these_items)
set the item_info to info for this_item
if folder of the item_info is true then
process_folder(this_item)
else if (alias of the item_info is false) then
process_item(this_item)
end if
end repeat
end tell

gets a list of folders as you can see, and then says the first folder
doesn't exist when it tries an "info for". I can't figure out what's
wrong with the syntax though. The line

info for disk "test"

gives the same error, Finder got an error: File some object wasn't found

The debugger output is below - it's OS X 10.2.8 and SD 3.0.6

Thanks,

Steve

tell current application
path to desktop
--> alias "Main Production Mac:Users:steve:Desktop:"
end tell
tell application "Finder"
get every folder of folder "test Master Database" of disk "test"
--> {
folder "Catalogue Production" of folder "test Master Database" of
disk "test",
folder "OUTDOOR PROJECTS CENTER" of folder "test Master Database" of
disk "test",
folder "test EXTRA ONLY" of folder "test Master Database" of disk
"test",
folder "test MAIN DATABASE" of folder "test Master Database" of disk
"test",
folder "test to be Databased" of folder "test Master Database" of
disk "test"
}
info for folder "Catalogue Production" of folder "test Master
Database" of disk "test"
end tell
Script 2nd approach finished
--> Finder got an error: File some object wasn't found.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Get a list of folders and then get told the items in the list don't exist
      • From: Christopher Nebel <email@hidden>
    • Re: Get a list of folders and then get told the items in the list don't exist
      • From: Steve Thompson <email@hidden>
  • Prev by Date: Re: POSIX file
  • Next by Date: Re: passing shell script arguments?
  • Previous by thread: container window--thank you
  • Next by thread: Re: Get a list of folders and then get told the items in the list don't exist
  • Index(es):
    • Date
    • Thread