I am trying to create a script to clean up student computers at the end of the school year, however if there is no file in say movies, then it will error and tell me "not such file or directory" and stop running. I would like the script to continue running even if there is no such file or directory found. Can someone help explain how I can get this script to continue working. Here is my script.
tell application "Terminal" do shell script "rm -r ~/Desktop/" delay 1 --pause for a sec do shell script "rm -r ~/Documents/" delay 1 --pause for a sec do shell script "rm -r ~/Pictures/" delay 1 --pause for a sec do shell script "rm -r ~/Movies/" delay 1 --pause for a sec do shell script "rm -r ~/Music/" delay 1 --pause for a sec do shell script "rm -r ~/Downloads/" delay 1 --pause for a sec tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Aqua Dark Blue.png"
end tell