Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to run programs from sub directory
Message
From
11/08/2003 11:19:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to run programs from sub directory
Miscellaneous
Thread ID:
00818920
Message ID:
00818920
Views:
66
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
Map
View

Click here to load this message in the networking platform