Path: utzoo!attcan!uunet!timbuk!cs.umn.edu!cybrspc!roy From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail) Newsgroups: comp.os.msdos.programmer Subject: Re: Passing command line arguments from .bat file to application? Message-ID: Date: 12 Oct 90 00:50:52 GMT References: <39104@ucbvax.BERKELEY.EDU> Organization: Villa CyberSpace, Minneapolis, MN Lines: 28 brand@janus.Berkeley.EDU (Graham Brand) writes: > I have been trying, without success, to pass a batch file command > line argument to a program that is invoked from inside the batch > file. The batch file has something like: > ..... > programname "%1" > ..... > and is invoked as: > batchfilename param > > but programname never gets param. Would someone advise me how to do > this correctly? The quotes are the problem. If you use simply progname %1 and invoke as batfile param progname will get param passed as you wish. For even more control in batch files, look into 4dos. The batch support is phenominal! -- Roy M. Silvernail |+| roy%cybrspc@cs.umn.edu |+| #define opinions ALL_MINE; main(){float x=1;x=x/50;printf("It's only $%.2f, but it's my $%.2f!\n",x,x);} "This is cyberspace." -- Peter da Silva :--: "...and I like it here!" -- me