another way is to use GetFileSystemInfos - then you don;t have to do two iteration (file then directories).