I'm trying to rename a file, but if the file name already exists to just move on. The script stops with `FileExistsError` exception raised, although I think I'm telling it to look for that? Yes, when the exception is raised the file does already exist.

```
try:
    # rename the file
    os.rename(infilename, newname)
except FileExistsError:
    # output if it exists already
    print(f'{newname} already exists')
    pass

```

Traceback is:

```
Exception has occurred: FileExistsError
[WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\MacalusoC\\Desktop\\PNC_to_Evo\\Evo DECO-10\\Evo PROG6001  FSJD0250240M  E.DBP' -> 'C:\\Users\\MacalusoC\\Desktop\\PNC_to_Evo\\Evo DECO-10\\Evo PROG6001  FSJD0250240M  E.part'
  File "C:\Users\MacalusoC\Desktop\PNC_to_Evo\PNC_Deco_to_Evo_Deco.py", line 75, in purge_DBP_files
    os.rename(infilename, newname)
  File "C:\Users\MacalusoC\Desktop\PNC_to_Evo\PNC_Deco_to_Evo_Deco.py", line 341, in main
    purge_DBP_files(new_folder)
  File "C:\Users\MacalusoC\Desktop\PNC_to_Evo\PNC_Deco_to_Evo_Deco.py", line 350, in <module>
    main()

```