When I am using shutil
, I get an unexpected error:
System error 183. Cannot create file when that file already exists
I am using this:
shutil.copytree(src,dst)
src
,dst
are paths to my directories which I would like to copy. Names are different. For example:
src = 'D:\test\tmp\dir1'
dst = 'D:\test\tmp\dir2'
I know, I could delete dir2
and everything is ok, but I would like to do it without this, is it possible with shutil
?