ept5452
June 21st, 1999, 02:33 PM
I am trying to select multiple file names from a single directory, however, I am only allowed to select 14 files until I get an error. I need to be able to select in the 1000's of
files. Is this possible and if so, what do I need to change in the following code?
CString szFileList2(""),szTemp2,Nameb,Nameb1,Nameb2,FileListb2("");
CFileDialog m_ldFile2(TRUE, _T("*"), NULL,
OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT,
_T("Raw Files (*.raw)|*.raw|All Files (*.*)|*.*||"));
if (m_ldFile2.DoModal() == IDOK)
{
POSITION pos = m_ldFile2.GetStartPosition();
while (pos)
{
szTemp2 = m_ldFile2.GetNextPathName(pos) + " ";
m_B.Add(szTemp2);
jj=jj+1;
j=jj;
}
}
for( int x=0; x<i; x++)
{
Nameb=m_B[x];
Nameb.MakeReverse();
y=Nameb.Find('\\');
Nameb1=Nameb.Left(y);
Nameb1.MakeReverse();
Nameb2=Nameb1 + " ";
m_B2.Add(Nameb2);
FileListb2+=Nameb2;
}
m_sInput2=FileListb2;
UpdateData(FALSE);
Thank you,
Erik Toth
files. Is this possible and if so, what do I need to change in the following code?
CString szFileList2(""),szTemp2,Nameb,Nameb1,Nameb2,FileListb2("");
CFileDialog m_ldFile2(TRUE, _T("*"), NULL,
OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT,
_T("Raw Files (*.raw)|*.raw|All Files (*.*)|*.*||"));
if (m_ldFile2.DoModal() == IDOK)
{
POSITION pos = m_ldFile2.GetStartPosition();
while (pos)
{
szTemp2 = m_ldFile2.GetNextPathName(pos) + " ";
m_B.Add(szTemp2);
jj=jj+1;
j=jj;
}
}
for( int x=0; x<i; x++)
{
Nameb=m_B[x];
Nameb.MakeReverse();
y=Nameb.Find('\\');
Nameb1=Nameb.Left(y);
Nameb1.MakeReverse();
Nameb2=Nameb1 + " ";
m_B2.Add(Nameb2);
FileListb2+=Nameb2;
}
m_sInput2=FileListb2;
UpdateData(FALSE);
Thank you,
Erik Toth