1. White spaces into folder name

when I use:

euiw c:\\Program Files\\EuFiles\\test.exw 

I get the following error message:

"Can not open program.exe
Paused: press any key ... "

This happens when there are folders with names that use spaces. OK?

I Can solv by writing

euiw "c:\\Program Files\\EuFiles\\test.exw" 

But, I do not like this way
There is another way ?

Thanks in advance

Sergio

new topic     » topic index » view message » categorize

2. Re: White spaces into folder name

sergelli said...

when I use:

euiw c:\\Program Files\\EuFiles\\test.exw 

I get the following error message:

"Can not open program.exe
Paused: press any key ... "

This happens when there are folders with names that use spaces. OK?

I Can solv by writing

euiw "c:\\Program Files\\EuFiles\\test.exw" 

But, I do not like this way
There is another way ?

On the command line, spaces signify different arguments, unless quoted. That's just the way it is.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: White spaces into folder name

Could also try the dos 8.3 short name: c:\Progra~1\...

new topic     » goto parent     » topic index » view message » categorize

4. Re: White spaces into folder name

mattlewis said...
sergelli said...

when I use:

euiw c:\\Program Files\\EuFiles\\test.exw 

I get the following error message:

"Can not open program.exe
Paused: press any key ... "

This happens when there are folders with names that use spaces. OK?

I Can solv by writing

euiw "c:\\Program Files\\EuFiles\\test.exw" 

But, I do not like this way
There is another way ?

On the command line, spaces signify different arguments, unless quoted. That's just the way it is.

Matt



I understand this would be a stupid amount of work to solve an insignificant long-running problem, but if the whole command line is passed to the Eu exe, why not have Eu look at the 2nd parameter, which would have "Files\EuFiles\test.exw" in it in this case, and see if it is a valid portion of path, and see if doing this does not invalidate the rest of the parameters on the commandline?

useless

new topic     » goto parent     » topic index » view message » categorize

5. Re: White spaces into folder name

sergelli said...

when I use:

euiw c:\\Program Files\\EuFiles\\test.exw 

I get the following error message:

"Can not open program.exe
Paused: press any key ... "

This happens when there are folders with names that use spaces. OK?

I Can solv by writing

euiw "c:\\Program Files\\EuFiles\\test.exw" 

But, I do not like this way
There is another way ?

Thanks in advance

Sergio



Don't put any Eu files in a path with spaces in it. I suspect Microsoft using a folder name with a space in it was to break dos programs and make some sadist happy. You do not need to put Euphoria in "\Program Files\", i never have.

useless

new topic     » goto parent     » topic index » view message » categorize

6. Re: White spaces into folder name

This could easily be done manually if you know when you're looking for a file name in relation to other parameters. Imagine I provide my program the following command line:

eui program.ex --filename C:\Documents and Settings\username\Desktop\Some Random File.txt --option 1 --do-not-fail 

As I'm looping through the output command_line() and I come across the parameter --filename, I could set a flag in my loop, like in_filename = true and then collect those parts until I encounter another parameter like --option, then join() all the parts I collected between those steps and set that as my entire file name. It's not a trivial process but it's certainly not difficult if you use a well-structure set of parameters.

-Greg

new topic     » goto parent     » topic index » view message » categorize

7. Re: White spaces into folder name

useless said...



Don't put any Eu files in a path with spaces in it. I suspect Microsoft using a folder name with a space in it was to break dos programs and make some sadist happy. You do not need to put Euphoria in "\Program Files\", i never have.

useless

Telling someone not to use folders with names without spaces, it may seem that our programs are the stone age, smile, do not you think?

Sergio

new topic     » goto parent     » topic index » view message » categorize

8. Re: White spaces into folder name

mattlewis said...

On the command line, spaces signify different arguments, unless quoted. That's just the way it is.

Matt

O.K. this works in command line But, this not works when that line is inside a program.exw

euiw "\"c:\\Program Files\\EuFiles\\test.exw\"" 

Also I get the following error message:
"Can not open program.ex
Paused: press any key ... "

I can solve by doing like so

ddd=chdir("\\Program files\\EuFiles") 
if ddd then 
 euiw "est.exw" 
end if 
ddd=chdir("returnToTheOldPath" 

But do not think it's an elegant way to program.
Is there another way to solve this?

new topic     » goto parent     » topic index » view message » categorize

9. Re: White spaces into folder name

sergelli said...

But, this not works when that line is inside a program.exw

euiw \""c:\\Program Files\\EuFiles\\test.exw\"" 

Also I get the following error message:
"Can not open program.ex
Paused: press any key ... "

I can solve by doing like so

ddd=chdir("\\Program files\\EuFiles") 
if ddd then 
 euiw "est.exw" 
end if 
ddd=chdir("returnToTheOldPath" 

But do not think it's an elegant way to program.
Is there another way to solve this?

It's not entirely clear what you're trying to do. I'm going to assume that euiw.exe is on your path, and you just want to run the program:

system( `euiw.exe "c:\Program Files\EuFiles\test.exw"`, -2) 

Note that I used the backticks for quotes, which do not use escapes, so it's maybe a little clearer what's going on. Of course, you could build that more dynamically:

path = `c:\Program Files\EuFiles\test.exw` 
system( sprintf(`euiw.exe "%s"`, { path }), 2) 

Matt

new topic     » goto parent     » topic index » view message » categorize

10. Re: White spaces into folder name

mattlewis said...

It's not entirely clear what you're trying to do. I'm going to assume that euiw.exe is on your path, and you just want to run the program:

system( `euiw.exe "c:\Program Files\EuFiles\test.exw"`, -2) 

Note that I used the backticks for quotes, which do not use escapes, so it's maybe a little clearer what's going on. Of course, you could build that more dynamically:

path = `c:\Program Files\EuFiles\test.exw` 
system( sprintf(`euiw.exe "%s"`, { path }), 2) 

Matt

O.K. Thus, (with the backticks for quotes) the code works perfectly.
But, it is normal that does not work with "system_exec"?
What should I do to get the same result, but using the "system_exec"?

new topic     » goto parent     » topic index » view message » categorize

11. Re: White spaces into folder name

I suggest you look at : "build_commandline" and "canonical_path". Type them into your search box in your local manual and it comes up. There is a parameter you can pass to canonical_path to give you 'short' names. canonical_path with TO_SHORT, gives you a token string you can use in place of a path and filename to the O/S, which never contains spaces even if the originals do.

Shawn Pringle

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu