1. Run an application in a directory named with spaces
- Posted by sergelli Sep 12, 2016
- 2138 views
Hello
A long time ago I posted here asking how to use this line in a Euphoria program
void = system_exec("C:\\Program Files\\testWe.exe", 2)
and to the present day, still can not solve the problem. Does anyone have a solution today?
Thanks in Advance
2. Re: Run an application in a directory named with spaces
- Posted by ne1uno Sep 12, 2016
- 2120 views
Hello
A long time ago I posted here asking how to use this line in a Euphoria program
void = system_exec("C:\\Program Files\\testWe.exe", 2)
and to the present day, still can not solve the problem. Does anyone have a solution today?
use 8.3 name?
void = system_exec("C:\\PROGRA~1\\testWe.exe", 2)
3. Re: Run an application in a directory named with spaces
- Posted by euphoric (admin) Sep 12, 2016
- 2094 views
Hello
A long time ago I posted here asking how to use this line in a Euphoria program
void = system_exec("C:\\Program Files\\testWe.exe", 2)
and to the present day, still can not solve the problem. Does anyone have a solution today?
Thanks in Advance
Have you tried escaping the quotes?
void = system_exec("\"C:\\Program Files\\testWe.exe\"", 2)
4. Re: Run an application in a directory named with spaces
- Posted by sergelli Sep 13, 2016
- 2088 views
Have you tried escaping the quotes?
void = system_exec("\"C:\\Program Files\\testWe.exe\"", 2)
Ok, so it works. Now the real problem and more difficult. Consider that "euwc" is in my path
void = system_exec("exwc \"C:\\Program Files\\testWe.EXW\"", 2)
How to make this line work?
5. Re: Run an application in a directory named with spaces
- Posted by petelomax Sep 13, 2016
- 2045 views
Ok, so it works. Now the real problem and more difficult. Consider that "euwc" is in my path
void = system_exec("exwc \"C:\\Program Files\\testWe.EXW\"", 2)
How to make this line work?
Works just fine here... Then again I am using Phix's system_exec...
Ahh, it does not work on exwc (2.4), and neither on eui 4.0 nor eui 4.1
Now that is rather odd.
6. Re: Run an application in a directory named with spaces
- Posted by sergelli Sep 13, 2016
- 2033 views
Ok, so it works. Now the real problem and more difficult. Consider that "euwc" is in my path
void = system_exec("exwc \"C:\\Program Files\\testWe.EXW\"", 2)
How to make this line work?
Works just fine here... Then again I am using Phix's system_exec...
Ahh, it does not work on exwc (2.4), and neither on eui 4.0 nor eui 4.1
Now that is rather odd.
I do not understand .... I tested with Eu3.11 and new versions 4. I've used this code in many operating systems from XP to Windows 10 and also with Linux under Wine
It never worked
In this last time I tested now in Windows 7, and nothing.
Certainly more people with this problem.
What is Phix's system_exec... ????
Please advise what is the secret.
7. Re: Run an application in a directory named with spaces
- Posted by petelomax Sep 14, 2016
- 2062 views
What is Phix's system_exec... ????
Please advise what is the secret.
Phix is my version of OpenEuphoria, see http://phix.is-great.org/
But you may not have to replace OpenEuphoria: if you go to https://bitbucket.org/petelomax/phix/src and download builtins/syswait.ew - but (important) click on the revision dropdown (top left, just before the words "Full commit") and select the oldest version (2015-08-27 init) that should still be OE compatible, but I haven't tested it for a while.
HTH, Pete
Edit: the latest version of syswait.ew has some Phix-specific Linux code in it that is not OE-friendly, which you'd have to delete, which is why I suggest getting the older version.
8. Re: Run an application in a directory named with spaces
- Posted by sergelli Sep 14, 2016
- 2012 views
Phix is my version of OpenEuphoria, see http://phix.is-great.org/
But you may not have to replace OpenEuphoria: if you go to https://bitbucket.org/petelomax/phix/src and download builtins/syswait.ew - but (important) click on the revision dropdown (top left, just before the words "Full commit") and select the oldest version (2015-08-27 init) that should still be OE compatible, but I haven't tested it for a while.
HTH, Pete
Edit: the latest version of syswait.ew has some Phix-specific Linux code in it that is not OE-friendly, which you'd have to delete, which is why I suggest getting the older version.
Phix looks good but I have doubts, however I can not I register on Phix forum because the site does not send me e-mail confirmation and there is no way to sent messages to the site administrators
9. Re: Run an application in a directory named with spaces
- Posted by euphoric (admin) Sep 14, 2016
- 1951 views
Have you tried escaping the quotes?
void = system_exec("\"C:\\Program Files\\testWe.exe\"", 2)
Ok, so it works. Now the real problem and more difficult. Consider that "euwc" is in my path
void = system_exec("exwc \"C:\\Program Files\\testWe.EXW\"", 2)
How to make this line work?
Can you clarify the problem? I don't understand. You say "euwc" is in the path, but then you try to use "exwc."
10. Re: Run an application in a directory named with spaces
- Posted by sergelli Sep 14, 2016
- 1938 views
Can you clarify the problem? I don't understand. You say "euwc" is in the path, but then you try to use "exwc."
I typed wrong. The correct is exwc
I'm referencing exwc.exe
11. Re: Run an application in a directory named with spaces
- Posted by petelomax Sep 14, 2016
- 1937 views
[duplicate post deleted]
12. Re: Run an application in a directory named with spaces
- Posted by petelomax Sep 14, 2016
- 1927 views
But you may not have to replace OpenEuphoria
Phix looks good but I have doubts,
Fair enough, that's perfectly understandable, and it is why I said what I said above.
however I can not I register on Phix forum because the site does not send me e-mail confirmation and there is no way to sent messages to the site administrators
You're not missing much, and you are talking to the site admin (I have been more than a bit lazy in my duties, but I cannot see any attempt to register by you, though I have just authorised 4 accounts, btw)
Pete
13. Re: Run an application in a directory named with spaces
- Posted by euphoric (admin) Sep 14, 2016
- 1951 views
Can you clarify the problem? I don't understand. You say "euwc" is in the path, but then you try to use "exwc."
I typed wrong. The correct is exwc
I'm referencing exwc.exe
Ah, OK. I figured there was a typo; I just wanted to be sure.
If you just type "exwc" on the command line, what happens?
14. Re: Run an application in a directory named with spaces
- Posted by irv Sep 15, 2016
- 1887 views
I just had a similar problem calling system("explorer " & file,0) where one part of the file path contains a space.
abbreviate_path(file) seems to solve the problem.
Give that a try
15. Re: Run an application in a directory named with spaces
- Posted by sergelli Sep 15, 2016
- 1888 views
Ah, OK. I figured there was a typo; I just wanted to be sure.
If you just type "exwc" on the command line, what happens?
This is what happens
c:\>exwc Euphoria Interpreter 3.1.1 for 32-bit Windows. Copyright (c) Rapid Deployment Software 2007 See http://www.RapidEuphoria.com/License.txt file name to execute?
16. Re: Run an application in a directory named with spaces
- Posted by sergelli Sep 15, 2016
- 1885 views
I just had a similar problem calling system("explorer " & file,0) where one part of the file path contains a space.
abbreviate_path(file) seems to solve the problem.
Give that a try
Any program that exists out there, open files in folders named with letters and spaces. I wanted my programs made with Euphoria, do the same thing.
I know this is possible, but far as I know it requires extra programming that transforms long names in 8.3 format and does not always work well.
It would be great if the Euphoria language would be responsible of solving this problem.
17. Re: Run an application in a directory named with spaces
- Posted by irv Sep 15, 2016
- 1860 views
Since long filenames with spaces work just fine with eui on Linux without any extra work, it appears this is a problem caused by Windows.
18. Re: Run an application in a directory named with spaces
- Posted by euphoric (admin) Sep 16, 2016
- 1893 views
If you just type "exwc" on the command line, what happens?
This is what happens
c:\>exwc Euphoria Interpreter 3.1.1 for 32-bit Windows. Copyright (c) Rapid Deployment Software 2007 See http://www.RapidEuphoria.com/License.txt file name to execute?
I just did this on my commandline:
c:\>eui "c:\Users\FOADDEV\Programs\iNet System\iNet_Administrator.exw"
And it worked fine. Can you do the same thing from your commandline (except using exwc and your own program path/name)?
19. Re: Run an application in a directory named with spaces
- Posted by sergelli Sep 16, 2016
- 1860 views
I just did this on my commandline:
c:\>eui "c:\Users\FOADDEV\Programs\iNet System\iNet_Administrator.exw"
And it worked fine. Can you do the same thing from your commandline (except using exwc and your own program path/name)?
exwc or eui both work well on the command line, even if they have to go through a folder with names with spaces.
But as I said earlier, do not work within a Eu code.
20. Re: Run an application in a directory named with spaces
- Posted by Mike777b Sep 19, 2016
- 1799 views
As per documentation (euphoria-4.0.5.pdf):
On WINDOWS, system exec() does not allow the use of command-line redirection in command. Nor does it allow you to quote strings that contain blanks, such as file names.
mike
21. Re: Run an application in a directory named with spaces
- Posted by fizzpopsoft Sep 20, 2016
- 1788 views
A possible solution, somewhat of a kludge...
Get your Euphoria app to create a batch file that contains the problematic path.
Then use system_exec to call the bat file.
22. Re: Run an application in a directory named with spaces
- Posted by petelomax Sep 21, 2016
- 1784 views
But as I said earlier, do not work within a Eu code.
Have you tried builtins\syswait.ew yet? (as per 7. above)