FileSystem.CopyFile Success or Not

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?

One thought: check to see if the file exists after the file was copied.

Sorry, @JacobSmall 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.

ah. I’d go the modification date being greater than the initial run date then.

I will say a ‘success/fail’ would be a good add, so filing this to the Dynamo wishlist would be good.

I will do that Jacob thank for the link.

For now it was rather easy to code it in python.

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