Why does ADDPATH not allow me to add a directory with a space in it in MATLAB 7.7 (R2008b)?
12 views (last 30 days)
Show older comments
When I try to add a directory with a space in it using the ADDPATH command:
addpath C:\Program Files\
I get the following warning:
Warning: Name is nonexistent or not a directory: C:\Program.
It seems that ADDPATH does not like the space in the directory name.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
When using the command syntax of ADDPATH, spaces between string inputs are interpreted as separators between arguments. To ensure that ADDPATH interprets the directory as a single argument, use the function syntax with parenthesis and single quotes around the directory name. For example:
addpath('C:\Program Files')
0 Comments
More Answers (0)
See Also
Categories
Find more on Search Path in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!