getfile function

Get a file name and path and store them in a list.