Is it possible to filter the filenames we see when we browse for a file using tkinter askopenfilename ? I don't need to filter by extension, but by a specific pattern in the filename.
For example I have hundred of files in one folder, most named "Chapter_XXX - Title" and only one file named "Book". I would like to display only the files that start with Book.
Is such a thing possible?
Thanks Martin, that worked. These type of examples should be included in the documentation.
The code I needed:
fileName = filedialog.askopenfilename(initialdir = "/",title = "Select file",filetypes = (("Books","Book*.*"),("All files","*.*")))