                                     (* Chapter 14 - Program 10 *)
program Set_Date_On_Disk_File;

uses Dos;

var Time_To_Set : longint;
    Date_And_Time   : DateTime;
    File_To_Change  : TEXT;
    Filename        : string[40];

begin
   if ParamCount = 1 then
      Filename := ParamStr(1)
   else begin
      Write('Enter filename ----> ');
      Readln(FileName);
   end;
   Assign(File_To_Change,Filename);
   Reset(File_To_Change);
   Date_And_Time.Year  := 1989;
   Date_And_Time.Month := 12;
   Date_And_Time.Day   := 1;
   Date_And_Time.Hour  := 12;
   Date_And_Time.Min   := 0;
   Date_And_Time.Sec   := 0;
   PackTime(Date_And_Time, Time_To_Set);
   SetFTime(File_To_Change, Time_To_Set);
   Close(File_To_Change);
end.
