Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing current directory and relative path
Message
From
04/11/2010 14:14:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01488018
Message ID:
01488277
Views:
36
>>>>>>It sounds like you should be using absolute paths.
>>>>>
>>>>>No, the paths should remain the same as they were.
>>>>>
>>>>>In other words, when I change the directory, the program no longer sees the procedures that are in the Progrs directory of the project.
>>>>
>>>>I'm completely confused now. I thought you said the problem was that the relative paths weren't working when you change dthe current directory and you wanted them to work. Could you explain with an example, please?
>>>
>>>When I'm switching between applications, I run this program:
>>>
>>>
>>>SET PATH TO CLASS LIBS,FORMS,GRAPHICS,MENUS,PROGRAMS,REPORTS,;
>>>  VFP LIBRARY\SHARED CLASS LIBS,VFP LIBRARY\SHARED FORMS,VFP LIBRARY\SHARED PROGRAMS,;
>>>  VFP LIBRARY\SHARED HEADER FILES,VFP LIBRARY\SHARED MENUS,VFP LIBRARY\SHARED REPORTS, ;
>>>  VFP LIBRARY\SHARED GRAPHICS
>>>
>>>
>>>so, I then can run the main program of the application and it will find all necessary programs.
>>>
>>>In one of my programs I need to change a directory to a different directory
>>>
>>>set default to (lcNewDir)
>>>
>>>after that the program does not see my programs. I want to be able to still test my programs in IDE and keep this program if possible (or somehow adjust it as I run it before I start working with every project).
>>
>>Put that way is a contradiction
>
>In other words, you suggest to use absolute path and pre-pend the application startup directory every time, right?
>I'll go with this idea, thanks.

You can
#IF IDEMODE
    * SET Absolute path
#ELSE
     * SET relative path
#ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform