Hello…
I’m trying to modify the Apple add new item folder action script so that when a file is dropped into it, it’s transfered to another location on a server. The script checks whether such a folder exits, and if it doesn’t, it should create it. But I keep getting the following error: “Can’t make current application into type location reference.”
I’ve created another script (not a folder action script) where this works without any problems. Below is an excerpt of the script that’s causing some problems for me. By the way, if I manually create the folder on the server (in this case “Houses for 2008”) the script proceeds because it doesn’t get stuck on the “make new folder” line.
More then likely, it’s something simple I’m overlooking… I’d attribute it to the fact that I’ve been messing around with Applescript for a short while and still a newby. Any help/insight would be appreciated.
Thanks, Paul.
set housePicsFolder to alias "TempoComposing:Artwork:RealEstate:All Houses:"
set housePicsPath to housePicsFolder as text
if fridayDate > item (monthCounter) of monthLength then
if currentMonth = "December" then
set housePicsYearFolder to "Houses for " & (currentYear + 1)
set housePicsYearPath to housePicsYearFolder & ":" as text
set housePicsTargetPath to housePicsPath & housePicsYearPath as text
set theResult to housePicsTargetPath as text
display dialog theResult
try
set housePicsTargetFolder to alias housePicsTargetPath
on error
make new folder at housePicsFolder with properties {name:housePicsYearFolder}
set housePicsTargetFolder to alias housePicsTargetPath
end try