Yep, my fault. I searched the web and found FindFirst from unit Dos, I didn't pay attention that it also available from SysUtils. I knew it only after finished writing the code. Yes, FindFirst and FindNext from SysUtils are better.
So I can delete DOS from the USES clause.
Not a good idea. Compiler gave me a bunch of errors. I think the cause is SearchRec
SysUtils must have an equivalent but called something else.
Looks like SearchRec, DosErro and TRawbyteSearchRec are all having prolems.
Compile Project, Target: project1.exe: Exit code 1, Errors: 17
unit1.pas(52,19) Error: Identifier not found "SearchRec"
unit1.pas(52,28) Error: Error in type definition
unit1.pas(62,16) Error: Identifier not found "archive"
unit1.pas(62,27) Error: Identifier not found "readonly"
unit1.pas(64,31) Error: Identifier not found "hidden"
unit1.pas(67,81) Error: Call by var for arg no. 3 has to match exactly: Got "<erroneous type>" expected "TRawbyteSearchRec"
unit1.pas(68,10) Error: Identifier not found "DosError"
unit1.pas(71,52) Error: Illegal qualifier
unit1.pas(72,26) Error: Call by var for arg no. 1 has to match exactly: Got "<erroneous type>" expected "TRawbyteSearchRec"
unit1.pas(74,25) Error: Call by var for arg no. 1 has to match exactly: Got "<erroneous type>" expected "TRawbyteSearchRec"
unit1.pas(80,83) Error: Call by var for arg no. 3 has to match exactly: Got "<erroneous type>" expected "TRawbyteSearchRec"
unit1.pas(81,12) Error: Identifier not found "DosError"
unit1.pas(83,24) Error: Illegal qualifier
unit1.pas(83,33) Error: Identifier not found "directory"
unit1.pas(86,60) Error: Illegal qualifier
unit1.pas(88,28) Error: Call by var for arg no. 1 has to match exactly: Got "<erroneous type>" expected "TRawbyteSearchRec"
unit1.pas(90,27) Error: Call by var for arg no. 1 has to match exactly: Got "<erroneous type>" expected "TRawbyteSearchRec"