Im pretty new to applescript and ive been trying to write a script that deletes a folder using terminal using administrative privlages. The thing im writing this script for another computer so i dont have the folder on it that i want it to delete. Is there a way i can tell applescript if it gets an error to ignore it and continue.
Here is the script, bear in mind im new to applescript
tell application "Terminal"
activate
do shell script "sudo rm -rf 'System Folder'" password pass with administrator privileges
do shell script "echo " & "$ sudo bless -folder ~/System/Library/CoreServices" password pass with administrator privileges
do shell script "echo " & "$ rm ~/Library/Preferences/ByHost/com.apple.Classic.some_number.plist" password pass with administrator privileges
do shell script "$ rm ~/Library/Preferences/com.apple.Classic.plist" password pass with administrator privileges
do shell script "$ rm ~/Library/Classic/.LoadClassicPref" password pass with administrator privileges
do shell script "$ rm ~/Library/Classic" password pass with administrator privileges
do shell script "$ sudo bless -folder /System/Library/CoreServices" password pass with administrator privileges
By the way it is a script to remove classic
Here is the script, bear in mind im new to applescript
tell application "Terminal"
activate
do shell script "sudo rm -rf 'System Folder'" password pass with administrator privileges
do shell script "echo " & "$ sudo bless -folder ~/System/Library/CoreServices" password pass with administrator privileges
do shell script "echo " & "$ rm ~/Library/Preferences/ByHost/com.apple.Classic.some_number.plist" password pass with administrator privileges
do shell script "$ rm ~/Library/Preferences/com.apple.Classic.plist" password pass with administrator privileges
do shell script "$ rm ~/Library/Classic/.LoadClassicPref" password pass with administrator privileges
do shell script "$ rm ~/Library/Classic" password pass with administrator privileges
do shell script "$ sudo bless -folder /System/Library/CoreServices" password pass with administrator privileges
By the way it is a script to remove classic