パスからフォルダ名を取得
ファイルパスからフォルダ名を抽出します。
function fnGetFolderNameByFilePath(strPath:string):string;
begin
strPath := StringReplace(strPath, '/', '\', [rfReplaceAll]);
strPath := ExtractFilePath(strPath);
strPath := ExcludeTrailingPathDelimiter(strPath);
strPath := ExtractFileName(strPath);
fnGetFolderNameByFilePath := strPath;
end;