StripDir

This function removes the directory part of a file path.

Syntax

Parameters

Returns

Returns the file name and extension without the directory part.

Example

local path = "MyFile.txt"
path = FileSystem:RealPath(path)

--Remove the directory and extension
System:Print((FileSystem:StripDir(path)))