General information
Category:
Coding, syntax & commands
Title:
How to run programs from sub directory
I am creating a new application and I'd like to organize my programs, forms and reports into folders in the main application directory, example f:\foxapp\programs, f:\foxapp\reports, f:\foxapp\forms, etc. All of these files are included in the project. The problem I'm experiencing is that unless I use the entire path when I call the program, it can't be found. I've included a function in my mainmenu program that I can pass parameters to which creates a variable with the program and path...
* FUNCTION: doprg
* g_programs is a global variable that holds the drive/path
Function DoPrg
Parameters uprg1,uprg2
Private lcStr
DO case
Case Type('uprg1')='C' and Type('uprg2')='C'
lcStr = g_programs + Alltrim(uPrg2)
DO &uPrg1 in &lcStr
Case Type('uprg1')='C' and Type('uprg2')#'C'
lcStr = g_programs + Alltrim(uPrg1)
DO &lcStr
EndCase
Return
This works, but now I'm concerned about processing speed. Is this approach going to really slow down the application once its compiled? I really don't want to hard code the directory name into the code.
Any help will be greatly appreciated,
Larry Morelli
Royal Oak, Michigan
(248) 640-7114
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only