home *** CD-ROM | disk | FTP | other *** search
- const dir = 'c:\temp\';
- mask = '*.*';
- var i : integer;
- fs : TStrings;
- most_recent_file_name : string;
- most_recent_file_datetime : Tdatetime;
- begin
- fs := pollfilelist(dir+mask,false);
- most_recent_file_name := '';
- most_recent_file_datetime := 0;
- for i := 0 to fs.count -1 do
- if GetFileDateTime(fs.strings[i]) > most_recent_file_datetime then
- begin
- most_recent_file_datetime := GetFileDateTime(fs.strings[i]);
- most_recent_file_name := fs.strings[i];
- end;
-
- if most_recent_file_name <> '' then
- begin
- Open(changefileext(most_recent_file_name,'.zip'));
- Add(most_recent_file_name)
- DoAdd;
- end;
- end.
-