I am trying to get a listing of files in the currently logged
directory and output those to a text file.
However, I cannot seem to figure out how to do this with the
FindFirst() and FindNext() functions in FreePascal. The example I
tried to base my own code on is as follows:
Unfortunately, I was not able to get my example (which follows) to
Procedure GenDirFile ;
Var SR: TSearchRec ;
Assign(DirFile, 'directory.lst') ;
DirList := TStringsList.Create;
if FindFirst('*.zip', faArchive, SR) = 0 then
until FindNext(SR) <> 0;
Is there something I am doing wrong here?
Any help anyone can give would be greatly appreciated.
a little further and use a tstringlist instead... mainly because
tstrings is designed to be inherited by other objects whch perform specialized tasks... tstringlist is one such object...
|Location:||Riverside County, California|
|Nodes:||15 (1 / 14)|