Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #1066

Re: Batch file replaceable parameters

From pete@nospam.demon.co.uk
Newsgroups comp.os.msdos.programmer
Subject Re: Batch file replaceable parameters
Date 2013-11-18 20:19 +0000
Organization PDL
Message-ID <1384805979snz@nospam.demon.co.uk> (permalink)
References <l61eus$cmi$1@speranza.aioe.org> <52844f28$0$9303$703f8584@textnews.kpn.nl> <l61k03$lqc$1@speranza.aioe.org> <5289f091$0$6875$703f8584@textnews.kpn.nl>

Show all headers | View raw


On 18th Nov 2013 at 11:48 "Sjouke Burry" <burrynulnulfour@ppllaanneett.nnll> wrote:

> On 14.11.13 5:35, Ed wrote:
> > Sjouke Burry wrote:
> >> On 14.11.13 4:09, Ed wrote:
> >>> Is it possible to pass the following string as a replaceable parameter in 
> a Batch file?
> >>>
> >>>       STUFF=8
> >>>
> >>> Batch appears to treat  =  as a delimiter and the result is two parameters 
> - "STUFF" and
> >>> "8". Is there any way to circumvent this?
> >>>
> >>>
> >>>
> >> Maybe try   "stuff=8"    with the quotes?
> >
> > Tried that (MS-DOS 7).  Didn't help.
> >
> > It's not a big issue since, if need be, I can create multiple versions of the
> > batch file and hard-code the string into the one's I wanted.  Just curious
> > whether there was a way to input such strings.
> >
> >
> >
> strange. I tried a batchfile named a.bat containing
> echo %1     1
> echo %2     2
> and when typing a "aa=bb"
> I get an output of:
> "aa=bb"   1
>            2
> This works both in "cmd" and "command" window,
> and the argument is not split in two
> When not using quotes:
> aa      1
> bb      2

I don't doubt that for a moment.  But using MSDOS 6.22 (I think the OP 
was using 7.0) that doesn't work; real MSDOS batch is a bit more 
limited :-(

Pete
-- 
Believe those who are seeking the truth.
Doubt those who find it.  -  André Gide

Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Batch file replaceable parameters "Ed" <invalid@invalid.com> - 2013-11-14 14:09 +1100
  Re: Batch file replaceable parameters Sjouke Burry <burrynulnulfour@ppllaanneett.nnll> - 2013-11-14 05:18 +0100
    Re: Batch file replaceable parameters "Ed" <invalid@invalid.com> - 2013-11-14 15:35 +1100
      Re: Batch file replaceable parameters pete@nospam.demon.co.uk - 2013-11-14 07:30 +0000
        Re: Batch file replaceable parameters "Ed" <invalid@invalid.com> - 2013-11-14 19:19 +1100
      Re: Batch file replaceable parameters "R.Wieser" <address@not.available> - 2013-11-18 10:53 +0100
        Re: Batch file replaceable parameters "Ed" <invalid@invalid.com> - 2013-11-19 20:00 +1100
          Re: Batch file replaceable parameters "R.Wieser" <address@not.available> - 2013-11-19 19:31 +0100
            Re: Batch file replaceable parameters "Ed" <invalid@invalid.com> - 2013-11-21 23:07 +1100
              Re: Batch file replaceable parameters "R.Wieser" <address@not.available> - 2013-11-21 17:39 +0100
      Re: Batch file replaceable parameters Sjouke Burry <burrynulnulfour@ppllaanneett.nnll> - 2013-11-18 11:48 +0100
        Re: Batch file replaceable parameters pete@nospam.demon.co.uk - 2013-11-18 20:19 +0000
        Re: Batch file replaceable parameters "Ed" <invalid@invalid.com> - 2013-11-19 20:02 +1100
  Re: Batch file replaceable parameters Herbert Kleebauer <klee@unibwm.de> - 2013-11-14 09:39 +0100
    Re: Batch file replaceable parameters "Ed" <invalid@invalid.com> - 2013-11-17 12:41 +1100

csiph-web