Dear all
I want to copy files from a local folder to multiple USB sticks. The following script does just that but it does it one stick after the another. I’d like to rather copy files asynchronously to save time.
Am I doing it wrong, is this a limitation in Applescript or is this a problem unrelated to Applescript?
tell application "Finder"
set StartupDisk to name of first disk whose startup is true
set EveryDisk to name of every disk
set EligibleDisks to {}
set source to alias "MY:SOURCE:PATH"
repeat with EachDisk in EveryDisk
if EachDisk is not in {StartupDisk, "home", "net", "Backup", "Time Machine Backups"} then ¬
set end of EligibleDisks to EachDisk -- Eligible for dismount
end repeat
choose from list EligibleDisks with prompt "Please choose one or more volumes." default items EligibleDisks with multiple selections allowed
set ChosenDisks to the result
if class of ChosenDisks is boolean then
-- User Canceled
else
repeat with EachDisk in ChosenDisks
ignoring application responses
with timeout of 900 seconds --15mins
duplicate every item of source to EachDisk with replacing
end timeout
end ignoring
end repeat
end if
end tell
Thank you for your help!