Click here to Skip to main content
13,054,615 members (55,151 online)
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 14 Mar 2003

FPATH - Search files in Environment's Directories

, 14 Mar 2003
Rate this:
Please Sign up or sign in to vote.
An utility to search files in Environment's Directories


After 25 years of programming, I have accumulated a vast array of tools especially command line oriented tools.  One such tool is FPATH.EXE which I used constantly on a daily basis. There is no way I can be productive without it.

What does FPATH do?

Well, its like a "WhereIS" utility but instead, it is designed to search the paths or directories defined in your environment table. For C/C++ programmers, the following three (3) environment strings are used:

  • PATH - Defines the directories for executables, batch files, etc.
  • INCLUDE - Defines the directories for your C/C++ include files (*.H files)
  • LIB - Defined the directories for your C/C++ Library files (*.LIB files)

For Delphi programmers (at least up to 3.0 which is when I last used it), the units and includes directories are defined in the DCC32.CFG file.  FPATH will search this file as well! Another concept that FPATH helps with is figuring out the extension of a file. Here are some every day examples one may go through:

Where is the windows.h file?

D:\src>fpath windows.h
6334     05/23/2001 23:38:46 \program files\microsoft sdk\include\windows.h

In this case, it was found in the INCLUDE environment string in the SDK include directory, which is expected.

I heard about this program, MSDEV, where is it?

D:\src>fpath msdev
270406   06/17/1998 04:00:00  \vstudio\common\msdev98\bin\msdev.exe 

In this case, no extension was provided because I don't know what it is.  FPATH found it in the PATH with an extension of EXE.   FPATH will try BAT, CMD, COM and EXE which is the order the OS command line interpreter will load files (Note: This was true in early 90's when FPATH was designed).

Hmmm, I downloaded this .NET program and it failed because its looking for MSCOREE.DLL. Do I have it?

D:\src>fpath mscoree.dll

In the case, it wasn't found. FPATH search the above environment strings. WCINCLUDE and WCLIB are our directories for our wcBASIC compiler used for our product Wildcat! Interactive Net Server (

If you want to define your own group of environment strings to search, then set the FPATH environment string.

Anyway, I think you get the idea. The source to FPATH is included. Enjoy.

Hector Santos, CTO
Santronics Software, Inc.


  • V3.5P - Initial Public Release


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

hector santos
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionUsing fpath.exe in a PHP script? Pin
Ttech25-Jan-07 6:07
memberTtech25-Jan-07 6:07 
GeneralHelp with accessing folder Pin
vgandhi13-Jun-03 8:42
membervgandhi13-Jun-03 8:42 
GeneralDrive letter missing Pin
Patje16-Mar-03 21:00
memberPatje16-Mar-03 21:00 
GeneralRe: Drive letter missing Pin
hector santos17-Mar-03 0:58
memberhector santos17-Mar-03 0:58 
GeneralWell, search file in the specified domain. Pin
Anonymous15-Mar-03 16:54
sussAnonymous15-Mar-03 16:54 
GeneralRe: Well, search file in the specified domain. Pin
hector santos17-Mar-03 1:00
memberhector santos17-Mar-03 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 15 Mar 2003
Article Copyright 2003 by hector santos
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid