Click here to Skip to main content
Click here to Skip to main content

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

Introduction

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
[path]
[include]
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
[path]
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
[path]
[include]
[lib]
[wcinclude]
[wclib]

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 (http://www.santronics.com)

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.

History

  • V3.5P - Initial Public Release

License

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

Share

About the Author

hector santos

United States United States
No Biography provided

Comments and Discussions

 
QuestionUsing fpath.exe in a PHP script? PinmemberTtech25-Jan-07 6:07 
GeneralHelp with accessing folder Pinmembervgandhi13-Jun-03 8:42 
GeneralDrive letter missing PinmemberPatje16-Mar-03 21:00 
GeneralRe: Drive letter missing Pinmemberhector santos17-Mar-03 0:58 
GeneralWell, search file in the specified domain. PinsussAnonymous15-Mar-03 16:54 
GeneralRe: Well, search file in the specified domain. Pinmemberhector santos17-Mar-03 1:00 

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

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 15 Mar 2003
Article Copyright 2003 by hector santos
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid