Delphiでパス文字列からファイル名部分を取り出すには、TPath.GetFileNameを使用します。
TPath.GetFileNameは、ファイル名の名前部分と拡張子部分を抽出します。
使用するユニット
use System.IOUtils;
使用例
Path := TPath.GetFileName('c:\windows\system32\notepad.exe'); //文字列Baseは「notepad.exe」
Path := TPath.GetFileName('c:notepad.exe'); //文字列Baseは「notepad.exe」
Path := TPath.GetFileName('http://www.gesource.jp/index.html'); //文字列Baseは「index.html」