Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: running an exe with system with filepath arg
Replies: 1   Last Post: Nov 3, 2009 10:58 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Erin

Posts: 1
Registered: 11/3/09
running an exe with system with filepath arg
Posted: Nov 3, 2009 10:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2009. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Goodwin College of Professional Studies.