: If I use findfirst or findnext, that will wasting time???
No time wasting there (takes only a fraction of a second), beside that's the only way to find out the file names from a folder...unless you read the FAT directly and process the info but that's a bit beyond plain Pascal's capability, you'd have to rely on assembly there...