({{, (RefLink[ExpandFileName, paclet:ref/ExpandFileName])["name"] 
textually expands name to have the form of an absolute file name for your operating system.}})

OpenersNotesSection(Spacer1)Details

(RefLink[ExpandFileName, paclet:ref/ExpandFileName])["name"] interprets name relative to your current directory.

(RefLink[ExpandFileName, paclet:ref/ExpandFileName]) expands directory designations such as . and ...

The result from (RefLink[ExpandFileName, paclet:ref/ExpandFileName]) has the form of an absolute file name, with standard pathname separators appropriate for your operating system.

(RefLink[ExpandFileName, paclet:ref/ExpandFileName]) just operates on names of files; it does not actually search for the file specified.

(RefLink[ExpandFileName, paclet:ref/ExpandFileName])[(RefLink[File, paclet:ref/File])["name"]] is also supported.

(RefLink[ExpandFileName, paclet:ref/ExpandFileName])[(RefLink[URL, paclet:ref/URL])["file:///path"]] converts a file-based URL to an absolute file name.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Convert the relative directory path to the full name:

SetDirectory[$UserBaseDirectory];

ExpandFileName["Applications"]

Reset the directory to the previous directory:

ResetDirectory[];

Expand the file name specified by the (RefLink[File, paclet:ref/File]) object:

SetDirectory[$InstallationDirectory];

ExpandFileName[File[".."]]

Convert a file scheme URL to an absolute path:

$LocalBase

ExpandFileName[URL[%]]

OpenersExampleSection2(Spacer1)Applications  (1)

Convert the local base URL to an absolute path name:

ExpandFileName[URL[$LocalBase]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[AbsoluteFileName, paclet:ref/AbsoluteFileName])  ▪  (RefLink[FindFile, paclet:ref/FindFile])  ▪  (RefLink[FileNames, paclet:ref/FileNames])  ▪  (RefLink[FileNameJoin, paclet:ref/FileNameJoin])  ▪  (RefLink[$InputFileName, paclet:ref/$InputFileName])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Operations on File Names, paclet:guide/OperationsOnFileNames])}, {▪(RefLinkPlain[String Manipulation, paclet:guide/StringManipulation])}, {▪(RefLinkPlain[File Operations, paclet:guide/FileOperations])}, {▪(RefLinkPlain[Systems-Related String Operations, paclet:guide/SystemsRelatedStringOperations])}})}})