Modification Date of file on a SMB volume

Hi all,

This is my first post so Hi…

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

any ideas?

Thanks in advance for your help.

Best regards,

Stuart.

Hi,

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

Thanks very much Stefan…! Your help is much appreciated.