I have made a little app for deleting files in folders.
I want to upgrade it, and add to the application the possibility to erase file older than x days ...

In a edit box, the user can put the number of day to keep the files ...
But  how can i substract from the FIletime file the (for example) three days and after that compare the calculated time with the selected filetime of the file...

Thanks a lot  ;)
Posted on 2007-09-24 13:47:17 by Bros
Uh uh uh - I know that one..  :D

Look into FILETIME the Struct and SYSTEMTIME the struct. Also look at the Api's named FileTimeToSystemTime and SystemTimeToFileTime.

Using the Transfer back and forth you can figure out what date it is. But to do calculations on the time itself, like adding, deducting days etc, you need to convert the FileTime to to days since 01.01.1601 as explained here by KetilO.

Good Luck - JimmyClif
Posted on 2007-09-24 17:46:39 by JimmyClif
Thanks It work very well


Posted on 2007-09-25 07:29:21 by Bros