plnelson
December 11th, 2008, 02:26 PM
This is probably not, technically, a C# question but it might have a C# solution so here goes . . .
When I travel I copy files to work on from my desktop to a thumbdrive and use whatever computer I have on the road. When I return I copy the changed files back. Now I'm writing a little C# utility to identify the files that have changed, based on their LastWriteTime compared to the same file on my desktop, and automatically copy only those back to my desktop.
I've run into a weird (Windows or XP?) problem. When I initially copy the files to the thumbdrive the modified time changes _JUST SLIGHTLY_. For example, I just copied a .doc file to my thumbdrive and the "modified time" changed from "December 11, 2008, 11:18:21 AM" to "December 11, 2008, 11:18:22 AM". WHY? That 1-second difference is enough for my program to think it's a newer file. I'm sure I can program around it (59 times out of 60) by lopping off the seconds, but why does it do this?
(moderators: feel free to suggest an alternative forum).
Thanks in advance!
When I travel I copy files to work on from my desktop to a thumbdrive and use whatever computer I have on the road. When I return I copy the changed files back. Now I'm writing a little C# utility to identify the files that have changed, based on their LastWriteTime compared to the same file on my desktop, and automatically copy only those back to my desktop.
I've run into a weird (Windows or XP?) problem. When I initially copy the files to the thumbdrive the modified time changes _JUST SLIGHTLY_. For example, I just copied a .doc file to my thumbdrive and the "modified time" changed from "December 11, 2008, 11:18:21 AM" to "December 11, 2008, 11:18:22 AM". WHY? That 1-second difference is enough for my program to think it's a newer file. I'm sure I can program around it (59 times out of 60) by lopping off the seconds, but why does it do this?
(moderators: feel free to suggest an alternative forum).
Thanks in advance!