mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 05:11:34 +01: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.
 | 
