Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

natcarish

macrumors newbie
Original poster
Jun 27, 2009
3
0
UK - Glastonbury
I have been using this script for some time now with no problems, but suddenly I get this error (I have updated the OS since using it), any ideas as to what's wrong? All the folders definitely exist.

script:

tell application "Finder"
set destination to choose folder with prompt "Choose the destination"
choose folder with prompt "Choose the Job folder"
set subfolders to every folder of result
repeat with thisSubfolder in subfolders
repeat with ProcessedFolder in thisSubfolder
tell application "Finder"
if name of ProcessedFolder contains "Output" then
if not (exists (folder (((destination as alias) as text) & ((name of ProcessedFolder) as text)))) then
if (count items of ProcessedFolder) > 0 then
copy folder (ProcessedFolder as alias) to folder (destination as alias)
end if
end if
end if
end tell
end repeat
end repeat
end tell


Event log:

tell application "Finder"
choose folder with prompt "Choose the destination"
alias "G-DRIVE mini:5031DA_Going_Out_Formal_David_Anthony:"
choose folder with prompt "Choose the Job folder"
alias "HD370:5031DA:"
get every folder of alias "HD370:5031DA:"
"Finder got an error: Can’t get alias \"HD370:5031DA:\"."
 
I ran the script on my machine, but commented out the second tell block. Checked event log and result history and everything seemed to work fine. I'm running Leopard.

mt
 
re: applescript error

Well, that's typically weird computer. I restarted the machine (I had done this before) and now it works as normal???

This machine is definitely acquiring an attitude!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.