Path: news.mathworks.com!not-for-mail
From: "JH " <jhlaks@colorado.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: running an external executable
Date: Sat, 26 Sep 2009 23:16:02 +0000 (UTC)
Organization: University of Colorado
Lines: 33
Message-ID: <h9m7bi$g0t$1@fred.mathworks.com>
References: <h9jvf0$mt3$1@fred.mathworks.com> <h9k0s0$m0m$1@fred.mathworks.com>
Reply-To: "JH " <jhlaks@colorado.edu>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254006962 16413 172.30.248.35 (26 Sep 2009 23:16:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 26 Sep 2009 23:16:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1463620
Xref: news.mathworks.com comp.soft-sys.matlab:573136


"Donn Shull" <donn.shull.no_spam@aetoolbox.com> wrote in message <h9k0s0$m0m$1@fred.mathworks.com>...
> "JH " <jhlaks@colorado.edu> wrote in message <h9jvf0$mt3$1@fred.mathworks.com>...
> > Does anyone know how to get an executable to run by using it's full path?  The command in question looks something like this:
> > 
> > --------------------------------------------------------------------------
> > system('C:\Documents and Settings\Fast\FAST.exe')
> > --------------------------------------------------------------------------
> > 
> > Apparently, the problem is the spaces in the path and it generates the following error:
> > 
> > --------------------------------------------------------------------------
> > 'C:\Documents' is not recognized as an internal or external command, 
> > operable program or batch file. 
> > --------------------------------------------------------------------------
> > 
> > Is there a way around this problem?  Putting everything in a location that has a path with no spaces is not really an option.
> > 
> > Thanks!
> 
> 
> Try
> 
> system('"C:\Documents and Settings\Fast\FAST.exe"')
> 
> OK I guess that is hard to see but enclose your string in double quotes then enclose that in single quotes.
> 
> Hope This Helps
> 
> Donn

Thanks, Donn.  That does the trick.

-JH