Created
May 25, 2016 02:56
-
-
Save z4none/fb82dab0e2eb99acaa483170e4eaa16e to your computer and use it in GitHub Desktop.
bcb enum files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TSearchRec SearchRec; | |
| int Attr = faAnyFile; | |
| int Ret = FindFirst(FolderPath + "\\*.*", Attr, SearchRec); | |
| while(Ret == 0) | |
| { | |
| if(AnsiString(SearchRec.Name) == "." || AnsiString(SearchRec.Name) == "..") | |
| { | |
| } | |
| else if(SearchRec.Attr == faDirectory) | |
| { | |
| // folder | |
| } | |
| else | |
| { | |
| // file | |
| } | |
| Ret = FindNext(SearchRec); | |
| Application->ProcessMessages(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment