RE: Paths with embedded spaces

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

Hi Chris,

The command_line() function for ex.exe and exw.exe just gives you command line 
as typed at the command prompt.  Nothing more and nothing less.  If you have:

  exw prog.exw file name with spaces.mp3

you get the arguments:

  file
  name
  with
  spaces.mp3

You might try:

  exw prog.exw "file name with spaces.mp3"

but this gives you:

  "file
  name
  with
  spaces.mp3"

What you really want is a single argument of:

  file name with spaces.mp3

One way I can think of around this is to write a function, say 
"quoted_command_line", which might be invoked like this:

  sequence cmd_line

  cmd_line = quoted_command_line(command_line())

The function would concatenate all the command line arguments and then split 
them up again but this time with some special processing for handling the 
quote (") character.  You might want to build a way to have a quote (") 
character allowed as part of an argument as in:

  exw prog.exw quote\"character

and also with:

  exw prog.exw "this string has a quote \" in it"

The Linux Euphoria doesn't have this problem because the UNIX shell does all 
this for you before exu has even been called.  For example this is perfectly 
ok in Linux:

  exu prog.exu "this string has a quote \" in it"

So a quoted_command_line type of function is one way to tackle this.  If you 
write one then I for one would appreciate a copy smile

Regards,

FP.

>===== Original Message From Chris Bensler <bensler at telus.net> =====
>
>How do I get around this?
>If I try to execute a file using ex/w.exe that contains spaces embedded in
>the path, EU thinks that the space is seperating the commandline parameters
>from the file name.
>It probably has something to do with long filenames, but I haven't a clue
>what to do about it.
>
>Chris
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu