pathsep
Displays or sets the character used to separate directories in the path.
Syntax
R = pathsep()
R = pathsep(newsep)
Inputs
- newsep
- If nargin is 0, the current character used to separate directories is returned.
Outputs
- R
- When nargin is 0, the current character used to separate directories in the path is returned.
Example
printf('\nshow the original path separator character\n')
pathsep()
printf('\n\nshow the path using this separator character\n')
R = path()
printf('\n\nset the path separator to a new character, returns the original character\n')
pathsep('*')
printf('\n\nshow the path using the new separator character\n')
R = path()
show the original path separator character
ans = ;
show the path using this separator character
R = C:/Program Files/Example/scripts;C:/Program Files/Example/scripts/oml
set the path separator to a new character, returns the original character
ans = ;
show the path using the new separator character
R = C:/Program Files/Example/scripts*C:/Program Files/Example/scripts/oml