Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!amdahl!pacbell!sactoh0!bkbarret From: bkbarret@sactoh0.UUCP (Brent K. Barrett) Newsgroups: comp.sys.ibm.pc Subject: Re: Full pathname of file wanted Message-ID: <859@sactoh0.UUCP> Date: 13 Apr 89 18:42:01 GMT References: <883@syma.sussex.ac.uk> Organization: Sacramento Public Access, Ca. USA Lines: 23 In article <883@syma.sussex.ac.uk>, leilabd@syma.sussex.ac.uk (Leila Burrell-Davis) writes: > I would like to pass to a program the full pathname of a file > whose location I give relative to the current directory. For > example, if I am in directory C:\SUBA\SUB1 and give the command > FOO ..\SUB2\MYFILE.EXT > I would like FOO to issue the command MYPROG C:\SUBA\SUB2\MYFILE.EXT > for preference, although MYPROG C:\SUBA\SUB1\..\SUB2\MYFILE.EXT > would probably be ok as well. For what language and what type of application? If it's in C, it's a trivial matter. If in BASIC or some other language I'm not familiar with on the PC then I'm afraid I can't help you. If in C, just grab the current working directory (getcwd()), and appen the path supplied as an argument (adding a backslash if needed). -- "Thanks, Data; I noticed." Brent Barrett ..pacbell!sactoh0!bkbarret GEMAIL: B.K.BARRETT