Function FSearch (Path: pathstr; DirList: string) : pathstr;
FSearch searches the file Path in all directories listed in DirList. The full name of the found file is returned.
DirList must be a list of directories, separated by semi-colons (or colons under LINUX).
When no file is found, an empty string is returned.
None.
Program Example10; uses Dos; { Program to demonstrate the FSearch function. } var s : string; begin s:=FSearch(ParamStr(1),GetEnv('PATH')); if s='' then WriteLn(ParamStr(1),' not Found in PATH') else Writeln(ParamStr(1),' Found in PATH at ',s); end.