#include <stdio.h>
#include <dos.h>
void main(){
 FILE *tx1; //BeSchreibFile
struct time t;                                  //DosZeitStruct
struct dosdate_t d;                             //DatumStruct
char *tag[7]={"So","Mo","Di","Mi","Do","Fr","Sa"};  //......
char *mon[12]={"Jan","Feb","Mär","Apr","Mai","Jun", //......
        "Jul","Aug","Sep","Okt","Nov","Dez"};//......
 _dos_getdate(&d);                              //Hole Datum
 gettime(&t);
  if((tx1=fopen("C:\\DOS\\login.inf","ab"))==NULL) return; //SCHREIB-DATEI Öffnen (Info-DATEI)
 fprintf(tx1,"%s.%.2d.%s.%.4d - %.2d:%.2d:%.2d\r\n",
 tag[d.dayofweek],d.day,mon[d.month-1],d.year,
 t.ti_hour,t.ti_min,t.ti_sec);
 fclose(tx1);        //WiederzuMachen der Datei1
}