I use Iomega QuickSync II to constantly back up my documents and templates directories to my Zip Drive. This not only provides me with an off site backup, but also allows me to work on any file outside of the office.
To enhance the system, I have written a macro, OpenFromZip(), that runs on my office machine. It makes
it easy to update my hard drive with any file I edited or created elsewhere. OpenFromZip() simply presents a FileOpen dialog on the ZipDriveDocuments directory. When I choose a file, the macro copies it to the corresponding subdirectory of the Documents directory on the hard drive. If the corresponding subdirectory does not exist on the hard drive, it creates it.
Most of the time it works fine, but I have had a couple of problems caused by human error. A couple of times, I have inadvertently overwritten the newer copy on the hard drive with the older copy on the zip because I mistakenly believed that the zip version was newer.
The macro currently overwrites the hard drive copy by default. I want to enhance it by adding a confirmation that shows the corresponding modification dates.
I have tried to use the FileDateTime(pathname) function in
If FileDateTime(ZipVersion) < FileDateTime(HDVersion) Then If MsgBox(HDVersion & " is newer than " & ZipVersion & _ ". Do you want to overwrite " & HDVersion & "(" & _ HDVerDate & ") with " & ZipVersion & "(" & ZipVerDate _ & "?", VBYesNoCancel) = VBYes Then [proceed with the copy, etc.]
I can’t seem to get the variables HDVerDate and ZipVerDate to work. The documentation says that FileDateTime(pathname) returns a variant. Any suggestions?