Skip to Main Content Skip to Search
Product Documentation

filesep - File separator for current platform

Syntax

f = filesep

Description

f = filesep returns the platform-specific file separator character. The file separator is the character that separates individual folder and file names in a path string.

Examples

Create a path to the iofun folder on a Microsoft Windows platform:

iofun_dir = ['toolbox' filesep 'matlab' filesep 'iofun']

iofun_dir =
   toolbox\matlab\iofun

Create a path to iofun on a UNIX[1] platform.

iodir = ['toolbox' filesep 'matlab' filesep 'iofun']

iodir =
   toolbox/matlab/iofun

See Also

fileparts | fullfile | pathsep


[1] UNIX is a registered trademark of The Open Group in the United States and other countries.

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS