Hi All
I want to cut string.String is "C:\\Abc\\ad\\ta.txt" and i want to cut these \\ad\\ta.txt. And new string like this C:\\Abc.
I want to cut String After Directory and first file or Folder.I am useing this code.
Plz help meCode:CString DirPath; CString FullPath = _T("C:\\abc\\cd\\as.txt"); int nPos = FullPath.Find( _T('\\') ); if( nPos >= 0 ) { DirPath = FullPath.Mid( 0, nPos); } AfxMessageBox(DirPath);




Reply With Quote