I’m not sure if this was the case in earlier version but as of Safari 1.2 (v125), when you download a file via Safari, you now get icons with progress bars, the filename has a .download extension, and the kind = “Safari download”. Further, using this script:
set the_file to "Path:to:DownloadingFile.download" as alias
set the_info_1 to (get info for the_file)
tell application "Finder" to set the_info_2 to (properties of the_file)
return {the_info_1, the_info_2}
This returns:
{{name:"DownloadingFile.download", creation date:date "Wednesday, February 4, 2004 12:30:55 PM", modification date:date "Wednesday, February 4, 2004 12:30:55 PM", icon position:{0, 0}, size:2.409145E+6, folder:true, alias:false, name extension:"download", extension hidden:false, visible:true, package folder:true, file type:"", file creator:"", displayed name:"DownloadingFile.download", default application:alias "Macintosh HD:Applications:Safari.app:", kind:"Safari download", short version:missing value, long version:missing value, bundle identifier:missing value}, {class:document file, name:"DownloadingFile.download", index:3, displayed name:"DownloadingFile.download", name extension:"download", extension hidden:false, container:folder "Desktop" of folder "jon" of folder "Users" of startup disk of application "Finder", disk:startup disk of application "Finder", position:{-1, -1}, bounds:{-33, -33, 31, 31}, kind:"Safari download", label index:0, locked:false, description:missing value, comment:"", size:missing value, physical size:missing value, creation date:date "Wednesday, February 4, 2004 12:30:55 PM", modification date:date "Wednesday, February 4, 2004 12:30:55 PM", icon:missing value, URL:"file://localhost/Users/jon/Desktop/DownloadingFile.download/", owner:"jon", group:"staff", owner privileges:read write, group privileges:read only, everyones privileges:read only, file type:missing value, creator type:missing value, stationery:false, product version:"", version:""}}
The size from the “get info” call returns a real while the Finder returns “missing value” (for physical size as well). There are also discrepancies in the file type and creator between the two records. Finally, the get info record sees the download file as a package folder. Perhaps this new info (especially the extension) could be used to wait for the file to finish downloading before proceeding with the script.
Jon