Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to run programs from sub directory
Message
 
 
To
11/08/2003 11:19:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00818920
Message ID:
00818932
Views:
27
Hi Larry,

You can use SET PATH command to add your development subdirectories to VFP search path. You can use path relative to the location of your project
SET PATH reports;forms;etc...
>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.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform