Python: copy long file path Shutil.copyfile
I want to copy too long paths with python using shutil.copyfile. Now I read this Copy a file with a too long path to another directory in Python page to get the solution. I used: shutil.copyfile(r'\\\\?\\' + ErrFileName,testPath+"\\"+FilenameforCSV+"_lyrErrs"+timestrLyr+".csv") to copy the file but it gives me an error : [Errno 2] No such file or directory: '\\\\?\\C:\\... Can anyone please let me know how to incorporate longs paths with Shutil.copyfile, the method I used above should allow 32k characters inside a file path, but I cant even reach 1000 and it gives me this error. Since the \\?\