First, we get the path by some way, most of cases with an open folder dialog.
Then we make a list with all files in that folder.
This can be useful for batch analyze / read/ write files.
import os path = 'c://temp' onlyfiles = [ f for f in os.listdir(path) if os.path.isfile(os.path.join(path,f))]