对了,是GETFULLPATHNAME()DWORD GetFullPathName( LPCTSTR lpFileName, // pointer to name of file to find path for DWORD nBufferLength, // size, in characters, of path buffer LPTSTR lpBuffer, // pointer to path buffer LPTSTR *lpFilePart // pointer to filename in path );
ExtractFileName()取得文件名
ExtractFilePath()取得文件路径
ExtractFileExt()取得文件扩展名
获取指定的文件路径有一个API
好象是:GETDIRECTORYPATH();不太肯定,你再自己查查!
Application.ExtractFilePath()
Application.ExtractFileExt()
LPCTSTR lpFileName, // pointer to name of file to find path for
DWORD nBufferLength, // size, in characters, of path buffer
LPTSTR lpBuffer, // pointer to path buffer
LPTSTR *lpFilePart // pointer to filename in path
);
根本不知道文件的位置,只知道文件名称,比如你知道硬盘上可能存在一个叫Scandisk.ini的文件,可是你不知道它在那里,
这个时候你只能去查找文件了
用 FindFirst,FindNext,FindClose这三个函数进行递归