I am trying to get the modification date of a file located on a SMB share. I will be comparing this date to todays date to see if a backup has been successful. I have written the bulk of the script, but am falling over getting the location of the file.
set FileLoc to "smb://servername/SMB Share/Database Backups/file.bak"
tell application "Finder"
set dbdate to modification date of the file FileLoc
end tell
unlike the whole Mac OS, which works with POSIX paths (slash separated), AppleScript expects old fashioned HFS paths (colon separated) starting with the name of the disk
-- set FileLoc to "smb://servername/SMB Share/Database Backups/file.bak"
tell application "Finder"
set dbdate to modification date of file "SMB Share:Database Backups:file.bak"
end tell