Does Python have any built-in functionality to add a number to a filename if it already exists? My idea is that it would work the way certain OS's work - if a file is output to a directory where a file of that name already exists, it would append a number or increment it. I.e: if "file.pdf" exists it will create "file2.pdf", and next time "file3.pdf". Continue reading...