Hello All!
I'm having an issue with a script. My main goal is to write a AppleScript that I can use in FileMaker down the road. Here's the script I am currently attempting to use but I run into these errors:
(The file is a simple HTML file, but when I tried with a .txt it gave me the same error)
set thefile to "/Users/mactech/Desktop/lol.html"
set DestinationPath to "Macintosh HD:Users:MacTech:Desktop:New Project 4 Neil:"
set destinationFilename to "ROFL2.txt"
with timeout of 60 seconds
tell application "Finder"
try
set theDupe to duplicate thefile to folder DestinationPath
set name of theDupe to destinationFilename
on error
display dialog "Oops, a problem occurred duplicating the file."
end try
end tell
end timeout
ERROR:
tell application "Finder"
copy "/Users/mactech/Desktop/lol.html" to folder "Macintosh HD:Users:MacTech:Desktop:New Project 4 Neil:"
--> error number -1700 from "/Users/mactech/Desktop/lol.html" to item
display dialog "Oops, a problem occurred duplicating the file."
--> error number -128
Result:
error "Finder got an error: User canceled." number -128
This is my second script I’ve ever worked with and when I attempt to google (error -1700 AppleScript) I can’t find a solution (or maybe I don’t understand what I’m reading!). Any help would be great! Thanks
Model: Macbook Pro (17inch)
AppleScript: 2.5.1
Browser: Safari 537.36
Operating System: Mac OS X (10.8)