Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RUN a exe whose path contains spaces
Message
From
16/10/1997 23:05:18
 
 
To
16/10/1997 23:03:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055090
Message ID:
00055091
Views:
21
>I have a problem where I need to run a program that potentially resides in a directory such c:\Program Files\blah blah\the.exe.
>
>I'm currently building the run command in a quoted variable and executing the run with a macro as follows:
>
>xCmnd = '"' + GetTheProgram() + ' ' + GetParameters() + '''
>&& xCmnd would look like "C:\Program Files\Blah Blah\The.exe C:\Program Files\Blah Blah\AnotherFileName"
>RUN &xCmnd
>
>Fail
>
>If, however xCmnd looked like "C:\Blah\The.exe C:\Program Files\Blah Blah\AnotherFileName" it works.
>
>It appears the parses takes to the first space as the executable file for the run command. Anyone know how to solve this problem.

I have had some problems like this before. Now, I am always using the RUN inside the macro so I now call the macro like this:

LOCAL lcExec
lcExec='RUN '+everythingyouneedhere...
&lcExec
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform