I’m brand new to Applescript and this is my first script so I’m sure there are tons of improvements that can be made.
What I need to do is mount a volume and transfer all the files from a folder to it and then disconnect the volume. Then repeat at a different location. I also want it to continue to the next location if there is an error connecting to a location. Then, at the end, display all of the successes and failures. So far, everything works, but I am having trouble with displaying all successes and failures. How I have it set up now, it will pop up a different box for each failure and not show any successes. Any suggestions would be greatly appreciated.
Here is what I have so far (this is a small piece because it repeats for each location)
Set Error1 to "0"
tell application "Finder"
try
mount volume "smb://username:password@IPAddress/Folder/Path"
delay 1
set filestomove to items in folder "local:folder:location"
move filestomove to "Path" with replacing
delay 1
eject disk "Path"
on error
set Error1 to "ServerName Failed"
end try
if Error1 is not "0" then display dialog " " & Error1