Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set destinationdirectory to ((path to applications folder) & "Diablo II Folder") as string
- set modfilepath to ((path to desktop) & "Diablo2Backup:Mod:mod") as string
- set originalcopypath to ((path to desktop folder) & "Diablo2Backup:Original:Diablo II Patch (Carbon)") as string
- set modcopypath to ((path to desktop folder) & "Diablo2Backup:Mod:Diablo II Patch (Carbon)") as string
- set filepath to ((path to applications folder) & "Diablo II Folder:Diablo II Patch (Carbon)") as string
- tell application "Finder"
- try
- if exists file (destinationdirectory & ":mod") then
- display dialog "Mod file found. Replace with Original?" buttons {"yes", "no"}
- if button returned of result is "yes" then
- duplicate originalcopypath to destinationdirectory with replacing
- delete (destinationdirectory & ":mod")
- display dialog "Original file copy success" buttons {"yay"}
- else
- display dialog "File copy canceled" buttons {"damn"}
- end if
- else
- display dialog "Original file found. Replace with Mod?" buttons {"yes", "no"}
- if button returned of result is "yes" then
- duplicate modcopypath to destinationdirectory with replacing
- duplicate modfilepath to destinationdirectory
- display dialog "Mod file copy success" buttons {"yay"}
- else
- display dialog "File copy canceled" buttons {"damn"}
- end if
- end if
- on error errmsg
- display dialog "Error: " & errmsg
- end try
- end tell
Add Comment
Please, Sign In to add comment