Python 长文件名支持在 Windows 中被破坏 [英] Python long filename support broken in Windows

查看:46
本文介绍了Python 长文件名支持在 Windows 中被破坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了Python脚本来拷贝文件;不幸的是,它一直失败,因为文件名太长(> 256).有没有办法解决这个问题?

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?

我使用的是 Python 2.5.4 和 Windows XP.

I'm using Python 2.5.4 and Windows XP.

干杯,

推荐答案

使用 以字符串 \\?\ 开头的路径.

Use paths beginning with the string \\?\.

这篇关于Python 长文件名支持在 Windows 中被破坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆