Re: Get a list of folders and then get told the items in the list don't exist
Re: Get a list of folders and then get told the items in the list don't exist
- Subject: Re: Get a list of folders and then get told the items in the list don't exist
- From: Ron Bishop <email@hidden>
- Date: Mon, 6 Oct 2003 12:21:55 -0500
I use the find command in shell scripting - very fast and gives you the
POSIX path listing.
If you want to avoid shell scripting, use the list files command of the
Satimage files Additions-
----------------------
set all_images_filelist to list files alias "Server:Database:"
----------------------
You'll end up with a recursive alias listing of all files in
"Server:Database:" in Mac format ready for anything.
Good Luck,
Ron Bishop
Macintosh Systems Administrator
The Kansas City Star
1728 Grand Boulevard
Kansas City, MO 64108
816/234-4943
On Monday, October 6, 2003, at 10:21 AM, Steve Thompson wrote:
Actually, I'm probably going about this the wrong way. If I explain
what I'm trying to do, maybe someone can help me.
I have a server that contains loads of low-res images used for
layouts. The path to these images is always
Server:Master Database:<folder1,2,3,4>:layouts:
The problem I have is that the part I've labeled folder1,2,3,4 can be
between one and four folders with varying names.
What I'm trying to do is build a list of the paths to all the layout
folders on the server. So, to clarify, I'd end up with
{"Server:Master Database:Foo:Bar:Layouts:","Server:Master
Database:Thing:Layouts:","Server:Master
Database:One:Two:Three:Four:Layouts:"}
and so on.
Does anyone have a better approach I could use?
Thanks,
Steve
On Monday, October 6, 2003, at 03:35 PM, Steve Thompson wrote:
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.
_______________________________________________
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.
_______________________________________________
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.