Wiki Home

VFP File Search Path


Namespace: VFP
What is the sequence Visual Foxpro uses to locate a file?
When trying to USE a file or assign a graphic file to an Image control, or SET PROCEDURE (VFPSet Procedure) to a file, what is the order that VFP uses to find that file?

The following is NOT from any documentation ( I couldn't find it anywhere ) but it's from experiments using the Image control and .APP files, and so probably is not authoritative for things such as SET PROCEDURE. If anyone has a definitive order, correct me here.
  1. In the .APP/.EXE file the currently running procedure/method is contained in. (In only the "current directory" there? are there "directories" inside .APP files, or are all files included in a project glommed together in the same "spot"?)
  2. In any other .APP/.EXE file that is currently loaded (from other executing procedures, or from SET PROCEDUREs. It appears referencing a .BMP in an .APP other that the one currently executing does not happen.
  3. The current Directory
  4. Anywhere on the SET PATH VFP path (left to right).
  5. Anywhere on the DOS PATH environment variable (only on certain commands such as LOCFILE() )

However, It gets a little trickier with VFPSet Procedure commands...

See Also: Visual Foxpro Invocation Stack, VFPSet Procedure
Category VFP Functions
( Topic last updated: 2001.01.15 08:44:38 PM )