FileNameSplit
FileNameSplit["name"]
splits a file name into a list of parts.
Details 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 "Windows", "MacOSX", and "Unix".
- 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.
- FileNameSplit[File["name"]] is also supported.
- FileNameSplit[URL["file:///path"]] converts a file-based URL to a list of parts.
Examples
open allclose allBasic Examples (2)
Scope (2)
Split name of the file specified by the File object:
Wolfram Research (2008), FileNameSplit, Wolfram Language function, https://reference.wolfram.com/language/ref/FileNameSplit.html (updated 2019).
Text
Wolfram Research (2008), FileNameSplit, Wolfram Language function, https://reference.wolfram.com/language/ref/FileNameSplit.html (updated 2019).
CMS
Wolfram Language. 2008. "FileNameSplit." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/FileNameSplit.html.
APA
Wolfram Language. (2008). FileNameSplit. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FileNameSplit.html