On Jun 17, 2005, at 11:28 AM, Sparky wrote:
set itemInfo to (info for (path to users folder))
on run {aInputs, aParameters}
tell application "Finder"
set itemInfo to (info for "/Users")
end tell
end run
"/Users" is not the type of path expected by info for.
Thank you. But I just used /Users in my posting to show that it is definitely a location that exists. There is a folder on my root volume named '/Developers'. If I change my script to refer to that folder (or more generally any folder or file on any mounted volume) my script fails with the file not found problem I mentioned.
That is because you are providing a string not a file or folder.
Paul, Thank you also for your comments. In answer to your first question, no I haven't used 'info for' before. I use AppleScript very infrequently I'm afraid. (Java & C++ mostly.) After reading your response I'm still stumped as to how to convert the POSIX paths that Automator passes to my action into aliases.
set foo to "/users"
POSIX file (foo) as alias
--
"Other than telling us how to live, think, marry, pray, vote, invest, educate our children and, now, die, I think the Republicans have done a fine job of getting government out of our personal lives."
--Craig Carter