Hi,
I'm trying to get my script to look if a file exist on a SMB server, but I can't get it to work.
I know that the file are there.
Can someone help me please?
I'm trying to get my script to look if a file exist on a SMB server, but I can't get it to work.
I know that the file are there.
Can someone help me please?
Code:
set connection to "smb://xx:xx@10.0.1.2/Webb"
set DownloadFolder to (path to downloads folder) as string
set UpdateFile to "xxx_v1.0b04.zip"
set UpdateFolder to ("smb://xxx:xxx@10.0.1.2/Webb/" & UpdateFile) as string
tell application "Finder"
mount volume connection
end tell
tell application "Finder"
if exists file UpdateFolder then
set theAction to button returned of (display dialog "There is a new update." buttons {"Download later", "Download now"} default button {"Download now"})
if theAction = "Download now" then copy file UpdateFolder to DownloadFolder
delay 100
end if
end tell