How to read folder recursively?
-
hi all, please help me on read recursive folder.
Thanks & Regards rakesh baldha
-
hi all, please help me on read recursive folder.
Thanks & Regards rakesh baldha
-
hi all, please help me on read recursive folder.
Thanks & Regards rakesh baldha
You don't know where to start ? ask a good friend
-
hi all, please help me on read recursive folder.
Thanks & Regards rakesh baldha
baldha rakesh wrote:
hi all, please help me on read recursive folder. Thanks & Regards rakesh baldha
MSDN and google are your friend.. any way your example
void Recurse(LPCTSTR pstr)
{
CFileFind finder;// build a string with wildcards
CString strWildcard(pstr);
strWildcard += _T("\\*.*");// start working for files
BOOL bWorking = finder.FindFile(strWildcard);while (bWorking)
{
bWorking = finder.FindNextFile();// skip . and .. files; otherwise, we'd // recur infinitely! if (finder.IsDots()) continue; // if it's a directory, recursively search it if (finder.IsDirectory()) { CString str = finder.GetFilePath(); cout << (LPCTSTR) str << endl; Recurse(str); }
}
finder.Close();
}"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief And You
-
baldha rakesh wrote:
hi all, please help me on read recursive folder. Thanks & Regards rakesh baldha
MSDN and google are your friend.. any way your example
void Recurse(LPCTSTR pstr)
{
CFileFind finder;// build a string with wildcards
CString strWildcard(pstr);
strWildcard += _T("\\*.*");// start working for files
BOOL bWorking = finder.FindFile(strWildcard);while (bWorking)
{
bWorking = finder.FindNextFile();// skip . and .. files; otherwise, we'd // recur infinitely! if (finder.IsDots()) continue; // if it's a directory, recursively search it if (finder.IsDirectory()) { CString str = finder.GetFilePath(); cout << (LPCTSTR) str << endl; Recurse(str); }
}
finder.Close();
}"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief And You
Thank you everybody i have got your concept. and i have implemetnted it thanks rakesh baldha.
Thanks & Regards rakesh baldha