I have used this to find a file in a given path:
path = "C:\\Users\\derpderp\\"
name = "derp.xlsx"
for root, dirs, files in os.walk(path):
if name in files:
print(name)
But how do one go about doing the inverse? So that if the file not exist: specify that file.
If I write:
if name not in files:
print(name)
It will iterate the file name that not exist for every folder/file etc.