[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to get the directory of the current executed file?
- From: Nikolai Kondrashov <spbnick@...>
- Date: Fri, 14 Jan 2011 09:43:48 +0300
On 01/14/2011 09:33 AM, Tang Daogang wrote:
What I want to know is to get the current EXCUTED file's directory, not
the current process' directory.
In general, this is not possible. Because the file (chunk) being executed
maybe executed from memory (with the help of a loadstring) and loaded from a
database before that or simply generated on the fly, for example. AFAIK,
there is no facility to detect the method used to retrieve/generate the
Are you sure you're solving the correct problem? Could you state your
purpose for finding out the directory of the file being executed?