PDA

View Full Version : Compare files by date created


mindstitchdr
05-26-2005, 11:03 PM
I need to compare 2 files by their date created. If they are the same a simple dialog.message saying same is all i need. If they are differant a dialog.message saying differant. That is all. Is this possible? If so, could you show me an example?

longedge
05-27-2005, 01:21 AM
Yes - the File.GetAttributes action (if memory serves me correctly) does this and returns a table with various attributes. I use the .WriteDateISO value to compare two files (local and on a server) before opening a front end to a SQL database locally. If there's a newer version on the server I copy/overwrite the local version before opening it. There is also a .CreationDateISO value (once again - from memory so it may be slightly different to that).

It works really well.

longedge
05-27-2005, 06:36 AM
Here's a little example using the creation date in ISO format.