hello!!!
i m not able to find all the fila name and directory within a
given directoy..plz tell me......
following code which i tried....
_LIT(dir,"c:\\"😉; //here put ur dir name..
CDir *fileList;
RFs opensession;
RFile file; // for writing all the file name in a file..
opensession.Connect(); //connect to fille server
if(opensession.SetSessionPath(setpath)!=KErrNone) // optional if u want to set path
Exit();
if(file.Replace(opensession,KCipherFileName,EFileWrite)!=KErrNone)
Exit();
TBuf8<256>data;
if(opensession.GetDir(dir,KEntryAttReadOnly,ESortByName,fileList)==KErrNone)
{
TInt k=fileList->Count();
TFileName c;
for (TInt i=0;i<k;i++)
{
TEntry entry =(*fileList)[i];
TPtrC filename = entry.iName;
c.Append(filename);
}
data.Append(c);
file.Write(data);
krishna