Partial implementation of selectFiles()