Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro.pc » RE: touching files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
RE: touching files [message #76396] Wed, 29 May 2013 23:55
Anonymous
Karma:
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Lattice C Library vs. DOS 2.0 Query
Next Topic: IBM PC,XT,AT,etc. graphics
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Apr 17 21:43:43 EDT 2024

Total time taken to generate the page: 0.08927 seconds