CFileFind finder;
BOOL bWorking = finder.FindFile(_T("E:\\temp\\*.*"),0); while (bWorking)
{
bWorking = finder.FindNextFile();
if ( finder.IsDots())
continue;if (finder.IsDirectory())
{
MessageBox(finder.GetFilePath,_T("提示"),MB_OK);
}
} ;
finder.Close();
请问,如何替换搜索出来的路径中E字符。如搜索:E:\temp\123.txt替换成D:\temp\123.txt ??
BOOL bWorking = finder.FindFile(_T("E:\\temp\\*.*"),0); while (bWorking)
{
bWorking = finder.FindNextFile();
if ( finder.IsDots())
continue;if (finder.IsDirectory())
{
MessageBox(finder.GetFilePath,_T("提示"),MB_OK);
}
} ;
finder.Close();
请问,如何替换搜索出来的路径中E字符。如搜索:E:\temp\123.txt替换成D:\temp\123.txt ??
CStirng str;
str.Find..
s.Replace('E','D');
str.Mid(1,str.GetLength());
str = "E" + str;
s.Replace(“E:\\”,“D:\\”);或者
s.SetAt(s.Find('E'),'D')