import os.path file_path=r'C:\Users\Administrator\Desktop\货物标\output1\招标文件正文_procurement.pdf' file_name=os.path.basename(file_path) print(file_name)