if file.filename == file_name: I am currently using this condition to find a file. Now I want to change this condition where we don't have file name because It changes everyday. also we get FileNamePattern (for eg. *.xlsx) from db but that also changes everyday depending on new incoming file. I tried using if fnmatch.fnmatch(file.filename, file_name): but it is not correct. Continue reading...