Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing current directory and relative path
Message
From
04/11/2010 07:24:22
 
 
To
04/11/2010 06:31:00
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:
01488166
Views:
42
\code is "something in between", since it means that code is a root directory from the current drive. In other words, it's relative to the current drive or drive mapping. It's relative to the current directory ONLY if you are at the root. That wasn't easy to explain, I hope you understand what I mean.

>>Thanks, I implemented a similar approach and all is well.
>>
>>>If you're setting your paths at startup, convert them to absolute at that point... like this:
>>>
	Do addpath With 'libs'
>>>	Do addpath With 'frx'
>>>	Do addpath With 'forms'
>>>	Do addpath With 'tools'
>>>	Do addpath With 'stuff'
>>>...
>>>
>>>Proc addpath
>>>	Lparam cPath
>>>	Try
>>>		cPath=FullPath(Addbs(cPath))
>>>
>>>		If Directory(cPath)
>>>			If Atc(cPath+',', Set('path')+',')=0
>>>				cPath=Set('path')+','+cPath
>>>				Set Path To (cPath)
>>>			Endif
>>>		Endif
>>>	Catch To oEx
>>>		Assert .F. Message oEx.Message
>>>	Endtry
>>>
>Naomi,
>Hi,
>
>Forgive me, but would you be able to explain what you call a absolute path and what you call a relative path?
>
>so e.g. curdir() = "D:\Myapplication"
>
>is than
>
>"D:\MyApplication\Code" an absolute path
>
>and
>
>"\Code" a relative path ?
>
>I am a little bit puzzled
>
>Thanks for replying.
>
>Koen
>
>Is "D:\MyApplication\Code
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform