Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set path woes
Message
From
08/02/2000 07:33:14
 
 
To
08/02/2000 06:15:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00328680
Message ID:
00328685
Views:
16
>Goodday!
>
>I was adviced that i should not make my code pathing "hardcore", as they call it. So i did first it worked well then after i changed the directory to test if it work it didn't
>
>
>To sum it up:
>The structure of the source file is this "c:\pleasure\dbase"
>I have a table named "password" inside "c:\pleasure\dbase "
>I used the command set path to '\dbase\' so the pathing would not be "hardcore".

Mistake 1 - the path "\dbase\" is based from the root of the drive, not relative to the current directory. A relative path would either use the "." prefix, or would omit the leading "\".

>Then I issued this command use "use password in 2"
>And then i used the the setup wizard and I installed the application to " c:\tmp\" .
>When i execute the program it produces an erorr saying that it cannot find "c:\tmp\password.dbc".
>Why did it looked for the "password" table in "c:temp" when i issued a seth path command.

SET PATH must be issued correctly each time the application runs. SET PATH specifies a list of directories to search when a non-fully qualified pathname is specified and the file does not exist in the current directory. If the file is not in the current directory and cannot be found along the search path, the error reports that thefile does not exist inthe current directory.

Relative pathing works based on the current working directory. If I had the path set to DATA, MISC, and I were in the directory "C:\TEMP", it would search for the file first in C:\TEMP, then in C:\TEMP\DATA, then in C:\TEMP\MISC

I think you need to do a little research on how the Windows/DOS path environment works - this is not a VFP problem, it's a major misunderstanding of how the operating system looks for things.

>
>
>
>thanks
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform