From: | Duane McDonnell |
Date: | 19 Dec 99 at 20:25:26 |
Subject: | Re: Get CurrentDir Name |
From: Duane McDonnell <dmcdonnell@primus.com.au>
>From: Steffen <steffen.mars@stenloese.mail.telia.com>
>SHORT:
>I need to get the name (ASCII) of my CurrentDir. I tried GetCurrentDirName(),
>but it seems it just returns what has been set via SetCurrentDirName() (it's
>taken from the CLI structure), so when i CD ( CurrentDir() ) it has no effect
>( it still returns the dir i started the program from).
>I CD to argv, so that if argv is just an assign, i get the actual path. Just
>like when i type ' CD S: ' from dos, calling ' CD ' will then tell me that im
>at ' Main:S ' (for instance).
Try locking the current dir, ie, Lock("", ACCESS_READ), then call
NameFromLock() to expand the name, then call UnLock().