Skip to content

getFilename()

Maingron edited this page Jan 4, 2022 · 2 revisions

Get a filename

Code

getFilename(path);

Variables

  • path = Path of the desired file [String]

Example

getFilename("C:/Documents and Settings/pi.txt")

Explanation

getFilename() returns the filename of a file. This means that it removes the full path. "C:/Documents and Settings/pi.txt" would become "pi.txt". If it's a folder, it will return the name of the folder, instead.

Clone this wiki locally