Hi,
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,
Hi,
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,
Have you tried the workarounds suggested in this old thread, exp. the "magic prefix" trick? I don't know if the underyling issue (that we're not using the right one out of the many available Windows APIs for files) ever got fixed, but the workarounds should work...
In order to use the \\?\ prefix (as already proposed), you also need to make sure you use Unicode strings as filenames, not regular (byte) strings.