Because of:
quote:
Originally posted by pedro_cesar
'cuz u missed a \ in the route right before "My Playlist"
And because you end your command line with a double slash (\\) which will be interpreted as a single slash (\).
In strings, if you wish to have a single slash, you must preceed it with an escape character. In JScript (and most other similar languages) the escape character is also a slash.
Hence why you must enter double slashes everywhere where you wish to use a single slash (\).
But the last character in your command line string is not meant to be a slash, it is meant to be a quote. Quotes are also special characters since they define strings. So either you tell JScript that the following character is going to be a special character and you must proceed it with the escape character (\), or either you enclose your entire string in single quotes (which also can be used in JScript to define a string):
Thus, either:
code:
Run("\"C:\\Documents and Settings\\James Ross\\My Documents\\My Music\\My Playlists\\Untitled Playlist.wpl\"");
or:
code:
Run('"C:\\Documents and Settings\\James Ross\\My Documents\\My Music\\My Playlists\\Untitled Playlist.wpl"');
where it begins with '" which is single quote ('), double quote (") and ends in "' which is double quote ("), single quote (').
What you put as command for the Run function must be enclosed into double quotes since it can/will contain spaces. These double quotes are part of the command line and string. They do not define the string. And since this entire command line (incl. double quotes) is a string you must enclose it into (double or single) quotes too.