So I have been instructed to write a script for my job, and the goal us to be able to select folders on a computer and back them up to a folder on one of our servers. So far I gave gotten the script to mount the server, take the users username in as input, and create a folder named that username on the server. The next step is to copy selected folders into that new folder on the server, and this is where I am hitting a speed bump (I have the line of code that will let the user select multiple folders, I just can’t get them to copy to that new folder)
Here is the code I have so far.
display dialog "Please enter your augnet username" default answer "username"
set username to (text returned of result)
mount volume "smb://orgs.augsburg.edu"
delay 3
tell application "Finder"
set folder backup to make new folder at folder "ORGS:Information Technology:www:kb_images:Migration Testing:" with properties {name:username}
end tell
choose folder with prompt "Please select what you would like to transfer" with multiple selections allowed
set theSelection to result
tell application "Finder" to duplicate theSelection to folder backup
Try: