So, how would I get a list of file types for all files in a directory? Let's say I've got the following: test1.txt test2.txt test3.jpg I'd like something similar to: .txt .jpg Any ideas?