scanning a directory
The following code is used to scan a directory or drive for files
There may be some units from the objectpascal toolbox required
If not available, their function should be obvious from the name
To have it doing something useful, substitute the dummy procedures
with real ones.
UNIT DScan;
{$F+}
INTERFACE
USES Dos;
TYPE PathType =STRING[64];
TYPE NameType =STRING;
TYPE DChangeProc =PROCEDURE(NewPath:PathType);
FMatchProc =PROCEDURE(N:NameType);
ECheckProc =PROCEDURE(VAR S:SearchRec);
DMatchProc =FUNCTION(O,N:NameType):BOOLEAN;
PROCEDURE DirectoryScanner(Dir:PathType;Mask:NameType);
PROCEDURE DriveScanner(D:CHAR;Mask:NameType);
PROCEDURE MultiDriveScanner(Dr:STRING;Mask:NameType);
VA