I have a script which creates a file, but I want to see if that file exists so I can move it to a different directory. The problem I am getting is that it looks in one directory level too high.
Ex fileIn = a/b/c/d Its looking in d, not c
print directory + " go up one!!!"
os.path.dirname(os.path.dirname(directory)) # this specific line does nothing
if f.endswith("_edited.xml"):
print "true"
else:
print "false"
#shutil.copy2(f, aEdit)
directory
set?