SetFileTime & DOS Filetime Limitations - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


SetFileTime & DOS Filetime Limitations

Hello All,

I have recently been in the process of scanning photographs dating back to the 1940s. In order to classify them better I decided to write a little utility that uses the Windows API SetFileTime function to set the file creation date to the date the photographs were actually taken.

All went well till I attempted to set dates prior to 01/01/1980 when I started getting "the parameter is incorrect" error messages. After some searching on the net I discovered that DOS filetimes have to range between 1980 and 2107. This makes a mockery of the FileTime structure which claims to store times as 100 ns intervals since 01/01/1601.

I am using Windows XP - perhaps the problem exists with Windows Vista as well. Briefly - am I stuck with the problem or is there anything at all that I can do to assign dates prior 01/01/1980?

I would greatly appreciate any tips.
I have just realized that this issue is in part related to the file system used by the disk in question. I have a drive with multiple partitions some of which are FAT32 whilst others are NTFS. I suspsct I accepted the default settings offered by the partition software I used.

Anyway - I tried this again on an NTFS disk and the date change worked perfectly. I can see the altered dates when I right click and view file properties. However...Windows Explorer simply shows blanks in place of the creation/modification dates. Anything I can do about this


  • mimilymimily Posts: 8Member
    maybe you used that partition software can not do files convert previously.which [b]Magic server partition manager-partition wizard [/b][italic][/italic][u][/u]can Convert partition format from FAT to NTFS,Convert Dynamic Disk to Basic Disk without data loss.maybe you can have a try
Sign In or Register to comment.