mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 14:58:26 +02:00
18 lines
349 B
ObjectPascal
18 lines
349 B
ObjectPascal
Program Example7;
|
|
uses Dos;
|
|
|
|
{ Program to demonstrate the FindFirst and FindNext function. }
|
|
|
|
var
|
|
Dir : SearchRec;
|
|
begin
|
|
FindFirst('*.*',$20,Dir);
|
|
WriteLn('FileName'+Space(32),'FileSize':9);
|
|
while (DosError=0) do
|
|
begin
|
|
Writeln(Dir.Name+Space(40-Length(Dir.Name)),Dir.Size:9);
|
|
FindNext(Dir);
|
|
end;
|
|
FindClose(Dir);
|
|
end.
|