You can go to terminal and type
ls # list files
ls -lt # list files with details
ls *.jpg # list only jpg files
ls > files.txt # list files and write them to files.txt
The # by the way, is just a comment. You can combine the above commands.
Although I need to say, that the PROPER way of doing this, is letting you code find those files in the desired directory, unless there's a good reason for not doing so.