best way to compare two none ms access files (1 Viewer)

Henryklassen

Registered User.
Local time
Today, 14:06
Joined
Apr 13, 2010
Messages
13
I'm trying to find the best practice for comparing two file, what I need to know is has the file changed.
So here's what I'm trying to achieve and my setup
I have a table where I store Parts each part has two files a production file which can be either a dxf, dwg, or iges file (CAD file types). The part will also have a supporting file that contains forming data.
what I want to do is check if Part 1234.dxf is in the Storage folder if not then copy it to the JOBS folder. However if the file already exsist in the JOBS folder is it the latest one
next
If the part is formed then check if the supporting file is in the storage folder if not then copy it to the jobs folder.

SO what is the best way to compare the file?
I'm using MS access 2010
 

MarkK

bit cruncher
Local time
Today, 12:06
Joined
Mar 17, 2004
Messages
8,181
Here's a function that returns the windows DateLastModified attribute of a file.
Code:
function GetFileLastModified(filespec as string) as date
   with createobject("Scripting.FileSystemObject")
      if .fileexists(filespec) then
         GetFileLastModified = .getfile(filespec).datelastmodified
      else
         err.raise 53
      end if
   end with
end function
Hope this helps,
 

Henryklassen

Registered User.
Local time
Today, 14:06
Joined
Apr 13, 2010
Messages
13
Thank you Mark, I will give it a shot this weekend.
 

Users who are viewing this thread

Top Bottom