Hello,
I am using FileSystem.CopyFile and everything is working well but I am trying to find a way to check if it actually worked. My end goal is to use it with the Player and to have a box letting the user know if it worked or not. The problem is that a bad directory path produces the same results as a good one.
Does anyone have a creative way to know if the files were successfully copied?
Sorry, @jacob.small I meant to put that in my OP. I am overriding existing files so they will be there regardless. I am looking into checking the file’s modification date but that seems like a big workaround.
import shutil
original = IN[0]
target = IN[1]
List = []
for o, t in zip(original,target):
try:
shutil.copyfile(o, t)
List.append(True)
except:
List.append(False)
OUT = List