Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!rpi!nyser!rodan!jfbruno From: jfbruno@rodan.acs.syr.edu (John F. Bruno) Newsgroups: comp.sys.ibm.pc Subject: Re: Where oh where does my program reside?? Keywords: the and if then where who what when why how question answer Message-ID: <1118@rodan.acs.syr.edu> Date: 24 Oct 89 17:02:23 GMT References: <1407@sdcc13.ucsd.edu> Reply-To: jfbruno@rodan.acs.syr.edu (John F. Bruno) Organization: Syracuse University, Syracuse, NY Lines: 23 In article <1407@sdcc13.ucsd.edu> pa1256@sdcc13.ucsd.edu (Jennifer's Lover) writes: >I have a question regarding how to pull some information out of DOS. > >I want to know, regardless of the current directory, what directory >my program resides in. > > [deleted stuff...] > >By the way, I am using Turbo C 2.0 and DOS 3.xx. > >Thanks, >-Don Woodward > Try this: #include void main (int argc,char *argv[],char *env[]) { printf("My name is %s\n.",argv[0]); } - John Bruno (jfbruno@sunrise.acs.syr.edu)