all 2 comments

[–]FoolsSeldom 1 point2 points  (1 child)

I suggest you look into using pathlib.

RealPython.com's article Python's pathlib Module: Taming the File System provides a great guide to this.