X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Georg Newsgroups: comp.os.msdos.djgpp Subject: Re: argv[0] Date: Sun, 4 Dec 2011 12:16:39 -0800 (PST) Organization: http://groups.google.com Lines: 12 Message-ID: <5059ad16-7787-49ef-8fb3-d9c21919a65b@d10g2000vbf.googlegroups.com> References: <16b04d29-8317-4c7f-929c-1a22a328fa32 AT p9g2000vbb DOT googlegroups DOT com> <9bf257a7-a0f8-43ba-a65f-36c6027f68cb AT r28g2000yqj DOT googlegroups DOT com> <6719f201-2317-420d-bb38-3be66c90140b AT q9g2000yqe DOT googlegroups DOT com> NNTP-Posting-Host: 92.250.191.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1323029914 4722 127.0.0.1 (4 Dec 2011 20:18:34 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sun, 4 Dec 2011 20:18:34 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: d10g2000vbf.googlegroups.com; posting-host=92.250.191.164; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr User-Agent: G2/1.0 X-HTTP-Via: 1.1 TAS-4-4.man-a X-Google-Web-Client: true X-Google-Header-Order: UALSERCVNKH X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4,gzip(gfe) Bytes: 2118 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com The code I want to use this for is in a directory with several subdirectories. One is BIN which contains the executable. Currently there is an environment variable needed that points to the main directory. If I can read out the absolute path to the executable I can retrieve the locations to all the subdirectories without needing an environment variable for that. I hope this will be more reliable than having the user set the environment variable as needed. Georg