Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retreive path one directory up
Message
From
12/04/2004 18:44:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00894269
Message ID:
00894271
Views:
9
>I am trying to get the path of one directory up from my current path. If I issue ?FULLPATH(curdir()) then I get the following:
>
>
>H:\test1\test2\
>
>
>how can I get one directory up as follows:
>
>
>H:\test1\
>
>
>
>
>thank
>Nick

Hi Nick,

How about this ?
cDir = fullpath(curdir())
cDir = left( cDir, rat('\', cDir, 2) )
HTH
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform