Hi All

any one has idea about the Finding Files in the folder and subfolder.

This code works for the Client , any one has Server side or Example Of 
WINAPISERVER class to get it

 if (WinApi::folderExists(_filePath))
                                {
                                        [fileHandle, fileName] = 
WinApi::findFirstFile(_filePath + '\\' + _fileExtension);
                                        /*
                                        if (!fileHandle)
                                        {
                                        //info(strfmt("No files with extension 
'%1' found in path '%2'.", _fileExtension, _filePath));
                                        return connull();
                                        }
                                        */
                                        while (fileName)
                                        {
                                                if 
(!bitTest(WinApi::getFileAttributes(_filePath + '\\'+ fileName), 
#FILE_ATTRIBUTE_DIRECTORY))
                                                {
                                                    fileCont += (_filePath + 
'\\' + fileName);
                                                }
                                                else if (_recursiveSearch && 
fileName != '.' && fileName != '..')
                                                {
                                                    fileCont += 
WinApi::findFiles(_filePath + '\\' + fileName, _fileExtension, 
_recursiveSearch);
                                                }
                                                fileName = 
WinApi::findNextFile(fileHandle);
                                        }//end of inner while
                                }//End if 

Thanks 

Anand Patil



      Keep up with people you care about with Yahoo! India Mail. Learn how. 
http://in.overview.mail.yahoo.com/connectmore

Reply via email to