05-17-2006 10:08 AM
Mmmh, nice idea actually. Though I'm not exactly sure if the MD5 calculation will take much less CPU time than a file copy 😉
@jasonhill wrote:
How about an alternate approach? If the MOD time difference is within a small range (less than 2 seconds, for example) use a MD5 comparison. If they are the same, the files are the same. If they are different, copy the modified one over. Not the most elegant solution, but you work with the file system(s) you have.
05-17-2006 10:46 AM
Well, these files are 20+ meg each, I don't want to read the whole bloody thing just to check the equivalence. That seems like excessive network traffic. Especially since I'm going to be checking them every so often, it doesn't make sense to download them just to find out they're the same as last time.
I can already rely on the fact that (in my case) if the time diference is < 2 seconds, they are the same file.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
05-17-2006 10:51 AM
Well, then my question becomes why is the LabVIEW result different from the Windows File Explorer result? If I look with windows explorer, the times are the same (down to the second). But FILE INFO returns times that are different, by one second. I would think that both cases go thru the same drivers to get to the local disk, and the same drivers to get to the server.
Looks like I'm wrong, though.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
05-17-2006 11:05 AM
ALL the ones that fail are different by exactly one second: e.g. 18:09:21.17 vs. 18:09:20.17.
So I don't believe it's some rounding problem.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
05-17-2006 12:46 PM - edited 05-17-2006 12:46 PM
Hi Coastal Rolf and others,
I use "FileSync" from here
As shown in the attached jpg, they include an option to ignore 2 second changes in timestamps.
This "2 second" probably has more to do with the file systems than it has to do with LabVIEW.
Ben
Message Edited by Ben on 05-17-2006 12:47 PM
05-17-2006 01:18 PM
Obviously, I'm not the first to run into this problem.
So, if I treat time differences of less than two seconds as zero, then I'm OK.
Maybe the Windows PROPERTIES box is smart(?) enough to do this "disregarding", and the LabVIEW GET FILE INFO thing is reporting the truth, so I get bit.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
05-17-2006 01:25 PM
Coatal wrote,
"... so I get bit. "
I hear you pain. I address this same idea in my Blog entry entitled "The Leaders Lead" found here.
http://forums.lavag.org/blog/champions/index.php?
The nice things about forums like this one is we get a chance to hear about how others have "bloodied their noses" and what trees to watch out for.
Ben
06-01-2006 04:08 AM
Is there any VI in LabVIEW or converion formula which can give me "The UTC time the event was generated as a 64 bit signed integer representing the number of 100-nanosecond intervals since January 1, 1601. This is equivalent to the FILETIME type in Win32 and .Net" ?
Somewhere on NI's website I found that LabVIEW first calculates this time using "SystemTimeToFileTime" VI. Does anyone has a copy or similar VI which can help me?
Pls reply ASAP
06-02-2006 12:46 PM - edited 06-02-2006 12:46 PM
Message Edited by JLS on 06-02-2006 01:00 PM
06-05-2006 05:46 AM
@AmitKaria2k wrote:
Is there any VI in LabVIEW or converion formula which can give me "The UTC time the event was generated as a 64 bit signed integer representing the number of 100-nanosecond intervals since January 1, 1601. This is equivalent to the FILETIME type in Win32 and .Net" ?
Somewhere on NI's website I found that LabVIEW first calculates this time using "SystemTimeToFileTime" VI. Does anyone has a copy or similar VI which can help me?