strPcopy(BaseDbName,A_BaseName);
gettemppath
setlength(tmpFile,MAX_PATH);
GetTempFileName(ExtractFilePath(application.ExeName),'',0,pchar(tmpFile));
================================== 目錄與文件 =======================================
uses FileCtrl;
(1) 判斷路徑是否存在
function DirectoryExists(Name: string): Boolean;
(2)對一個全路徑文件進行分割
ProcessPath (const EditText:string; var Drive:Char; var DirPart:string; var FilePart:string)
(3)創建一不存在的路徑
function ForceDirectories(Dir: string): Boolean;
(4) 選擇一個目錄
function SelectDirectory(const Caption: string; const Root: WideString; out Directory: string): Boolean;
function SelectDirectory(var Directory: string; Options: TSelectDirOpts; HelpCtx: Longint): Boolean;
uses Sysutils;
(1)function ExtractFileDrive(const FileName:string):string; //取得路徑文件名中的驅動器名
function ExtractFileDir(const FileName: string): string; //取得路徑文件名中的路徑名 (最後沒有"")
function ExtractFilePath(const FileName: string):string; //取得路徑文件名中的路徑名 (最後 有 "")
function ExtractFileExt(const FileName: string): string; //取得路徑文件名中的擴展名 (.XXX)
function ExtractFileName(const FileName: string):string; //取得路徑文件名中的文件名 (AAA.XXX)
(2)function CreateDir(const Dir: string): Boolean;
function GetCurrentDir: string;
function RemoveDir(const Dir: string): Boolean;
function SetCurrentDir(const Dir: string): Boolean;
function ExpandFileName(const FileName: string): string;
(3) MKDir chDir GetDir RmDir DiskFree DiskSize FileSize
(4) fileGetAttr fileSetAttr fileAge fileGetDate fileSetDate fileDateToDateTime DateTimeToFileDate
(5) fileSearch FindFirst findNext findClose fileExists
(6) copyFile MoveFile Rename RenameFile ChangeFileExt DeleteFile Erase Truncate
(7) AddignFile Reset ReWrite Append CloseFile FileOpen fileCreate fileClose
(8) Seek filePos Eof Eoln FileSeek SeekEoln
(9) Read ReadLn Write writeln FileRead fileWrite BlockRead BlockWrite
Flush(F)