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: Cant get alias \"HD370:5031DA:\"."
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: Cant get alias \"HD370:5031DA:\"."