RE: Paths with embedded spaces

new topic     » goto parent     » topic index » view thread      » older message » newer message

Ok I finally got round to testing the quoting options on a "pure DOS"
install of MS DOS 6.20 with Euphoria and running my argtest program as
follows:

  ex argtest.ex "is this one argument"

Gives me:

  Arg 01: [C:\EUPHORIA\BIN\EX.EXE]
  Arg 02: [argtest.ex]
  Arg 03: [is this one argument]

I stand very humbly corrected :-]

After a bit more experimenting I have discovered the source of my original
confusion.  I use the freeware DOS Pacific C Compiler to code up a few
utilities here and there and it is this compiler that does _not_ do useful
quote (") processing of the command line.

Hence it is Euphoria which _does_ do the intelligent work when it discovers
quote characters on the command line and groups arguments accordingly.

Regards,

FP.

---- Original message ----

Thanks for that Chris.

  I tried this on my Windows NT 4.0 system (service pack 6a) here at work and 
  the command quoting works fine.

  However I'm sure I've had a problem when it hasn't worked though. I think 
  that the quoting facilities provided in a DOS shell might depend on whether 
  you are runing "pure DOS" or whether you are running a "DOS box" from a 
  Windows GUI like Win95, Win98, WinNT or Win2000. Until I get to my test 
  machine at home I'll not be able to prove that. My guess is that pure DOS 
  won't provide quoting but DOS running _within_ Windows does but right now 
  thats just speculation on my part.

  Here is the program I used to test the quoting with:

  -- argtest.ex

  include get.e

  function main()
  sequence cmdline

  cmdline = command_line()

  for i = 1 to length(cmdline) do
      printf(1, "Arg %02d is [%s]\n", {i, cmdline[i]})
  end for

  return(wait_key())
  end function

  abort(main())

  If anyone wants to try this on a pure DOS machine with:

  ex argtest.ex "is this one argument"

  then I'd be interested in the results.

  Regards,

  FP.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu