How can we copy files from one directory to another?
The following can be used:
import os def CopyFiles(dir1, dir2): ''' Copy all files of dir1 directory into dir2 directory ''' try: for filename in os.listdir(dir1): shutil.copy(os.path.join(dir1,filename), dir2) return True except: ExtAPI.Log.WriteMessage("Error : Could not copy files") return None