MATLAB: How to run a script with spaces in its name

script name

I store my script in 'My Script.m'. Is there a way to call that script without changing it to 'My_Script.m'? Thanks.
>> run 'My Script'
??? Error using ==> run at 69
Error using ==> evalin
Undefined function or method 'My' for input arguments of type 'char'.

Best Answer

No, you cannot do that, not even using run(). Script file names and function file names are required to use the same semantic rules as MATLAB identifiers: must begin with a letter (upper or lower case English alphabet), which can then be followed by any combination of digits, underscore, or upper or lower case English alphabet letters, and the total name length must be at most 63.
You could read the contents of "My Script.m" in to a string and then eval() the string, maybe.