home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
vp21beta.zip
/
LEXMPSRC.RAR
/
SEARCH.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
2000-08-15
|
976b
|
40 lines
{█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█}
{█ █}
{█ Virtual Pascal for Linux █}
{█ Test example for file searching █}
{█ ─────────────────────────────────────────────────█}
{█ Copyright (C) 1999 Joerg Pleumann █}
{█ █}
{▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀}
program Search;
uses
Dos;
var
Path, Name: string;
I: Integer;
begin
FileSystem := fsDos;
Path := GetEnv('PATH');
for I := 1 to Length(Path) do
begin
if Path[I] = ':' then Path[I] := ';';
if Path[I] = '/' then Path[I] := '\';
end;
Write('Enter a file name to search: '); ReadLn(Name);
Name := FSearch(Name, Path);
if Name = '' then
WriteLn('Sorry, not found.')
else
WriteLn('Complete name is: ', Name);
end.