Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


splits a file name into a list of parts.

Details and OptionsDetails and Options

  • FileNameSplit by default uses pathname separators and other conventions suitable for your operating system.
  • FileNameSplit[,OperatingSystem->"os"] uses the conventions of the specified operating system. Possible choices are , , and .
  • Absolute file names that begin with a pathname separator yield a list of parts that starts with .
  • Under Windows, the drive or share name is treated as the first part of the file name.
  • FileNameSplit just operates on names of files; it does not actually search for the file specified.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Split a file name into its path components:

Click for copyable input

On Windows, the share name is treated as a single unit:

Click for copyable input
Introduced in 2008