Hacker wrote:What?!? How? I mean, What?!? How?
You were so amazed that I checked this again more attentively.

Example: modification time of some file was "05.06.2003 17:53:42.329" (last 3 digits are milliseconds). After I applied AddTime with "+1 year" task the file's ModfifyTime became "05.06.2004 17:53:44.000". Your temp msg box showed the following:
Code: Select all
c:\tipa papka takaja\tipa tozhe\tipa fajlo takoe.txt
Previous date: 05.06.2003 17:53:44
New date should be: 05.06.2003 17:53:44
New date is: 05.06.2003 17:53:44
As you can see I was a bit wrong saying "values displayed in the temporary message boxes are valid". PrevTime is not valid (in my previuos test I was paying attention to "should be" and "is" times). So the dog is in getting the time. Seems that Delphi function you use rounds up the time: it sees 329 milliseconds and snaps to the next FAT's "time quantum". So the conclusion: drop this buggy Delphi and move to C++ and plain WinAPI!

(joke)
The reason why some files are handled OK (remember, I wrote that 6 files don't receive 2-second makeweight) is that they have even number of seconds and 0 milliseconds.
Nevertheless one note: TC is also written in Delphi, therefore it must be using the same time function as your AddTime, but it snaps to the previous "time quantum"??? (TC displays "05.06.2003 17:53:42.329" time as "05.06.2003 17:53:42, whereas AddTime displays it as "05.06.2003 17:53:44")
Second note: What kind of WinAPU do you use in awc
winapi.exe?

WinAPI's GetFileTime or FindFirstFile return valid times but awcwinapi.exe displays wrong ones...