Here I'm using the code in python like:
if option2 == 1:
try:
global option2, Nimages
for sur in fm_path:
shutil.copy(sur,file1) # here how to speed up the copy function
option2 = 0
except shutil.Error as e:
print('Error: %s' % e)
While executing this, if I copy a lengthy file it took too much time to copy. Any suggestion to reduce the time?