You can use a file iterator.