I have a file: E:\test.blend
Why does the following code not print “true”?
FWIW, I got the file_exists code from:
https://www.w3schools.com/python/python_file_remove.asp
Also, is there a simple way to figure out the filepath (Windows for now) when referencing a .blend file for import/append?
import bpy
import os
def file_exists(filepath):
if os.path.exists("filepath"):
return "true"
else:
return "false"
my_filepath = "E:\test.blend"
print (file_exists(my_filepath ))