[comp.os.msdos.programmer] Updating a file date

roy@cs.umn.edu (Roy M. Silvernail) (07/18/90)

I have a project underway, for which I need to be able to update a
file's date (ala Touch). I have RTFM, but can't seem to find a Turbo C
function to do this. Do I have to resort to some skullduggery? Spawning
Touch won't work, as I can't be sure it's available on the user's
system.

Your ideas will be appreciated, and I'll summarize any e-mail, if
there's sufficient interest. Thanks in advance.
--
    Roy M. Silvernail   | #include <stdio.h>                 | Does virtual
    now available at:   | main(){                            | reality need
 cybrspc!roy@cs.umn.edu |  float x=1;                        | swap space?
(cyberspace... be here!)|  printf("Just my $%.2f.\n",x/50);} | -- me

ts@uwasa.fi (Timo Salmi LASK) (07/18/90)

In article <2m2gm1w162w@cybrspc> cybrspc!roy@cs.umn.edu (Roy M. Silvernail) writes:
>I have a project underway, for which I need to be able to update a
>file's date (ala Touch). I have RTFM, but can't seem to find a Turbo C
>function to do this. Do I have to resort to some skullduggery? Spawning

That is somewhat surprising since Turbo Pascal has such a function
(SetFTime) and there are so much common ingredients to these two
Turbo products.  But if this is really so, then resort to interrupt
21Hex function 57Hex.

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

johnl@esegue.segue.boston.ma.us (John R. Levine) (07/19/90)

In article <2m2gm1w162w@cybrspc> cybrspc!roy@cs.umn.edu (Roy M. Silvernail) writes:
>I have a project underway, for which I need to be able to update a
>file's date (ala Touch). I have RTFM, but can't seem to find a Turbo C
>function to do this. ...

In my copy of the FM, on page 317, it describes the setftime() call that
sets a file's time and date.  You can also find it in the index under
"Date, File."  Sheesh.

-- 
John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 864 9650
johnl@esegue.segue.boston.ma.us, {ima|lotus|spdcc}!esegue!johnl
Marlon Brando and Doris Day were born on the same day.