The functions split the filename supplied, regardless of whether a real file of that name exists.
Get Folder Name
= IO.Path.GetDirectoryName(filename)
When file is in the root folder the final \ is included e.g. "C:\"When file is in any sub-folder the final \ is missing e.g. "C:\digitaldan"
Get File Name Without the Extension
= IO.Path.GetFileNameWithoutExtension(filename)
This returns just the file name, no path and no extension e.g. "image"
Get File Name Without the Extension
= IO.Path.GetFileNameWithExtension(filename)
This returns just the file name and the extension e.g. "image.jpg"When the extension is blank/not-present, this function removes the extension "."
Get File Name With Path and Extension
= IO.Path.GetFullPath(filename)
This returns just the path (with final "\" file name and the extension e.g. "C:\digitaldan\image.jpg"When the extension is blank/not-present, this function does not include the extension "."
Get Disk Drive from filename
= IO.Path.GetPathRoot(filename)
This returns just the Disk Drive Name from the file name. It includes the final "\" e.g. "C:\"
DigitalDan.co.uk