I write Python script to copy files; unfortunately it keeps failing because filename is too long(>256). Is there anyway to deal with that problem?
I'm using Python 2.5.4 and Windows XP.
Cheers,
If you are typing more than 260 characters, then you can either extract the file into the root folder to reduce the characters, or enable the long path support in the system via Registry Editor. You can also go for a third-party ZIP file extraction tool if the troubleshooting methods do not work.
Press Win + R keys on your keyboard and type gpedit. msc then press Enter. Group Policy Editor will be opened. Go to Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem, then enable the Enable Win32 long paths option.
Use paths beginning with the string \\?\
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With