Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : SETTIME.PAS

 
Output of file : SETTIME.PAS contained in archive : PASTUT.ZIP
(* 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.


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : SETTIME.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/