GetFilePart()

Syntax

Filename$ = GetFilePart(FullPathName$ [, Mode])
Description
Retrieves the file part of a full path.

Parameters

FullPathName$ The full path to get the filename from.
Mode (optional) It can be one of the following values:
  #PB_FileSystem_NoExtension: Get the filename without its extension (if any).

Return value

Returns the file name. For example, if the full path is "C:\PureBasic\PB.exe", the result will be "PB.exe".

Remarks

To retrieve the extension or the path part from a full path, look at the GetExtensionPart() and GetPathPart() functions.

See Also

GetExtensionPart(), GetPathPart()

Supported OS

All

<- GetFileDate() - FileSystem Index - GetHomeDirectory() ->