Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Erin
Posts:
1
Registered:
11/3/09
|
|
running an exe with system with filepath arg
Posted:
Nov 3, 2009 10:14 PM
|
|
I have an external .exe (myexe.exe) that I want to call from a GUI. The .exe is located on the matlab path (it will eventually be part of a deploy package that will contain my GUI program). The GUI accepts user input to specify the path of the file that is an argument to the executable. Essentially what I would like to do is:
system(myexe.exe path\files.ext)
This seems to run fine if the path is C:\file.ext or C:\folder\file.ext.
However, I get an issue when the path is C:\Documents and Settings\... I believe this is due to the space in the filename as the error returned says no file C:\Documents exists.
I can see the system function documentation notes a problem with UNC pathnames and suggests changing the directory beforehand or using a function to call system. Can anyone explain to me how to do this or suggest another workaround?
|
|
|
|