Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How determine strartup folder inside app started from VF
Message
From
30/09/1998 07:49:06
 
 
To
30/09/1998 07:38:38
Dmitry V.Glouzdov
LUKOIL (Nizhny Novgorod)
Nizhny Novgorod, Russia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00142271
Message ID:
00142298
Views:
32
>Hi!
>Thank you for reply.
>>Hi, neighbor
>>If I understand correctly, you want to get the folder your app is in. That's simple, you use CURDIR(), or even better something like following:
>>
 lcCurrentDirectory = SYS(5); &&  current drive
>> + CURDIR()  && current directory
>
>This will work only if you will start MyFile.App from System Menu Program/Do
>or type in Command Window two commands:
> SET DEFAULT TO (sMyAppLocation)
> DO MyFile.App
>
>But how determine folder (sMyAppLocation) inside my app if I will type next:
> SET DEFAULT TO HOME()
> DO (sMyAppLocation+"MyFile.App")
>???????????

Well, interpreting our examples, I'd try something like following:
LOCAL lcAppPath
lcAppPath = FULLPATH(CURDIR()) + "MyApp.app"
CD HOME()  && The same as SET DEFAULT TO HOME()
DO (lcAppPath)
--  OR
LOCAL lcAppPath
lcAppPath = FULLPATH(CURDIR())    && Only the path
CD HOME()
DO (lcAppPath + "MyApp.app")
See you later, aligator
Danijel
Previous
Reply
Map
View

Click here to load this message in the networking platform