Why am I unable to open a file with a space in its name from the Visual Directory in MATLAB 7.0 (R14)?

15 views (last 30 days)
I have a file with a space in its name, such as "my filename.m". I am able to open this file by double-clicking on it in a Windows Explorer window, or by right- or double-clicking in the Current Directory Browser. However, when using the Visual Directory Browser, I receive dialog boxes stating the following:
File my.m does not exist
File filename.m does not exist

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Jan 2010
Files with spaces in their names cannot be accessed by the Visual Directory. The command executed when openning files by this method is something like
edit my filename
MATLAB interprets this command as an attempt to edit two files, 'my.m' and 'filename.m'. Although using spaces in a filename is allowed by the Windows operating system, the use of files with spaces in their names is not supported in MATLAB. See the following Related Solution 1-15YJ2 for more information.

More Answers (0)

Categories

Find more on File Operations in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!