1. White spaces into folder name
- Posted by sergelli Oct 24, 2011
- 36035 views
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
2. Re: White spaces into folder name
- Posted by mattlewis (admin) Oct 24, 2011
- 36063 views
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
3. Re: White spaces into folder name
- Posted by PeteE Oct 24, 2011
- 36005 views
Could also try the dos 8.3 short name: c:\Progra~1\...
4. Re: White spaces into folder name
- Posted by useless Oct 25, 2011
- 35991 views
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
5. Re: White spaces into folder name
- Posted by useless Oct 25, 2011
- 35821 views
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
6. Re: White spaces into folder name
- Posted by ghaberek (admin) Oct 25, 2011
- 35863 views
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
7. Re: White spaces into folder name
- Posted by sergelli Oct 26, 2011
- 35805 views
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, , do not you think?
Sergio
8. Re: White spaces into folder name
- Posted by sergelli Oct 26, 2011
- 35860 views
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?
9. Re: White spaces into folder name
- Posted by mattlewis (admin) Oct 26, 2011
- 35817 views
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
10. Re: White spaces into folder name
- Posted by sergelli Oct 26, 2011
- 35848 views
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"?
11. Re: White spaces into folder name
- Posted by SDPringle Oct 27, 2011
- 35822 views
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