The file is attached to a hidden document in a database. When that database is opened, I have some simple script to check if the file exists on disk. If it doesn’t, it is then detached to the appropriate spot.
Periodically, this file will be updated and re-attached to the document. I would like to be able to compare the file date of the file on disk (using the FileDateTime function) with that of the attached file, and overwrite the file if an update has been made.
Unfortunately, I cannot see any properties when I get a handle to the file attachment object.
Is there any way to accomplish this without detaching the file to a temporary spot and comparing the dates that way? That just seems to me like an expensive operation to undertake every time the user opens the database.
Subject: RE: Is there any way to determine the file date of a file attachment?
Thanks for your response Paul. I think I have the solution now (see my own response).
In fact, there were several files attached (should have added that to my original post!).
By using the method described in my response, I have been able to successfully compare each file with its on-disk counterpart, and replace where necessary.