Checking Availability of user inputted File name

24

FileName = raw_input("Please input a Valid File Name : ")
if os.path.isfile("C:/Users/Brads/Documents/" + FileName + ".txt"):
    print("File Exists")
else:
    print("File does not exist")

Comments

Submit
0 Comments