Path: utzoo!attcan!uunet!cbmvax!kevin From: kevin@cbmvax.commodore.com (Kevin Klop) Newsgroups: comp.sys.amiga.tech Subject: Re: Programming Question Keywords: C, programming Message-ID: <13097@cbmvax.commodore.com> Date: 6 Jul 90 22:40:50 GMT References: <8180@ur-cc.UUCP> Reply-To: kevin@cbmvax (Kevin Klop) Organization: Commodore, West Chester, PA Lines: 29 In article <8180@ur-cc.UUCP> gest_ltd@uhura.cc.rochester.edu (Gavin Stark) writes: > >Question: Does anyone know how from within C to find the directory that a >program was run from.. I don't mean the currect shell directory.. I want >to find the directory where the program actually exists on the disk... Like >if I had a file in my C directory I would want the program to get DH0:C >even if I was in DH0:Source when I ran the program.. Any help would be >appreciated. > > >Gavin Stark. >gest_ltd@uhura.cc.rochester.edu Under OS revision 2.0, you can look in ProgDir: to access files in the same directory as the one that your program was launched from. If you want to do it, the code is a little bit tougher... -- Kevin -- Kevin Klop {uunet|rutgers|amiga}!cbmvax!kevin Commodore-Amiga, Inc. ``Be excellent to each other.'' - Bill and Ted's most excellent adventure Disclaimer: _I_ don't know what I said, much less my employer.