Skip to content

filesep

Platform-specific path separator.

c = filesep

Returns the file-path separator for the current platform — '\' on Windows, '/' on POSIX (Linux, macOS). Use to build paths in a portable way.

filesep % '\\' (Windows) or '/' (Unix)
['data' filesep 'input.csv']
  • fullfile — Build a file path from directory and file components.
  • fileparts — Split a file path into its components.