Originally posted by: markz@microsoft.UUCP (Mark Zbikowski)
Message-ID: <8709@microsoft.UUCP>
Date: Sat, 25-Aug-84 14:13:05 EDT
Article-I.D.: microsof.8709
Posted: Sat Aug 25 14:13:05 1984
Date-Received: Thu, 30-Aug-84 20:16:41 EDT
Organization: Microsoft Corporation
Lines: 11
Does anyone know of an easy way to "touch" a file in MSDOS?
i.e to modify the time stamp to the current time.
There must be some clever dos call that will do such a thing.
Two ways:
o Ugly: Open file for I/O, read first byte, seek back to 0 and write it back.
o Clean(er): Open file (open system call) get current date/time (getdate and
gettime system calls) set the time on the handle (filetimes system call)
and close it.