How do i specify a file that not exists in path?

Published: 14/01/2020
How do i specify a file that not exists in path?
Source: STACKOVERFLOW.COM

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.

Read more
Related news
Comment
FACEBOOK