Skip to content Skip to sidebar Skip to footer

Copy Files With Strange Name In Python Got Error 22

I try to copy files with arbitrary names in windows 7 64bit with python using os, shutil.copy2 and win32.file.copyfile. I copied all the files in certain folders. Sometimes I had

Solution 1:

Try using shutil.copytree to copy a folder and all it's content to a destination.

import shutil
shutil.copytree('path/to/folder', 'path/to/destination')

Post a Comment for "Copy Files With Strange Name In Python Got Error 22"