I am building a workflow that reads source file names and folder structure from a SQL Database and then creates that folder structure on a drive and copies the files from source location to destination. Easy using the Transfer Files node HOWEVER I lose the “File Created” and “Date Modified” metadata from the original file. I can do it using python but it is incredibly slow and not workable. My Python snippet is below, very simple. I am using the Create Folder node to pre-build the folder structure to avoid shutil.copy2 errors.
import shutil src = flow_variables['SourceFile'] dst = flow_variables['DestinationFile'] shutil.copy2(src,dst)
Is there a another solution? To gauge scale, I could be copying upwards of 100K documents.