choose multiple folders with choose menu and empty their contents
Hello all,
new to applescript and want to create a choose file menu where I can choose more than one folder and purge their contents. There would be a dialog box at the end letting me know that the folders have been purged. The script I have works for an individual folder:
tell application "Finder"
close every window
open (choose folder with prompt "which folder(s) should i purge?" multiple selections allowed "True" default location "/users/bryceratops/")
set a to front Finder window
move every item of a to trash
close front Finder window
end tell
tell application "Finder"
display dialog "folder(s) purged." buttons {"ok"}
end tell
But Im having a hard time setting up this script to open, purge, & close every finder window If I've selected multiple folders in the choose menu.
Any ideas?
Cheers