This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

FileNameJoin

FileNameJoin[{"name1", "name2", ...}]
joins the namei together into a file name suitable for your current operating system.
  • The "namei" can be either individual names or file paths containing pathname separators.
  • FileNameJoin[{"", "name1", ...}] gives an absolute file path beginning with a pathname separator.
  • FileNameJoin[..., OperatingSystem->"os"] yields a file name in the format for the specified operating system. Possible choices are "Windows", "MacOSX" and "Unix".
  • FileNameJoin just assembles a file name; it does not actually search for the file specified.
  • FileNameJoin["name"] canonicalizes the file name "name", making pathname separators appropriate for your operating system.
Give an operating system dependent file name:
Append the file name to a path:
Give an operating system dependent file name:
In[1]:=
Click for copyable input
Out[1]=
 
Append the file name to a path:
In[1]:=
Click for copyable input
Out[1]=
New in 7