home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 22.7 Inpath()
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- function inpath(mfile)
- LOCAL pathlist,jj,tfile
- if ! file(mfile)
- pathlist := PARSE( getenv("PATH"),";" )
- for jj = 1 to len(pathlist)
- tfile := pathlist[jj]+"\"+trim(mfile)
- if file(tfile)
- return .T.
- endif
- next
- else
- return .T.
- endif
- return .F.
-
- // end of file CHP2207.PRG
-