How to move folder/files with path names > 255 characters in Windows 8.1? [closed]

隐身守侯 提交于 2019-12-04 01:32:47

问题


How can you copy/move a folder or file with path name length > 255 on windows?

I have looked around for ages, and the only possible way I have found is to use the subst method. I wish I didn't have to mess about with this. I simply want to copy/move a file or directory, X, to location Y.

I'm fine with making a .bat script, or other kinds of scripts to achieve this.


PS: this is marked as of topic, which I'm fine with, but it was being done in a programming context.


回答1:


I finally found a good solution!

The savior is

Robocopy

Robocopy supports path names > 256 by default, and even provides a flag that lets you turn OFF support for long path names (flag: /256).

Example usage of Robocopy:

robocopy /E C:/path/with/very/long/names/in/it C:/new/path




回答2:


Not Windows 8 but in Windows 7, 64bit, I have the same problem and I just discovered that while nothing else worked, I was able to cut and paste folders containing files with path names that were too long into a destination folder with a shorter path. That is, in Explorer.exe, I selected a directory that I couldn't delete because some files had path names that were too long, then CTRL-X to cut it and paste it into another explorer window (CTRL-V).



来源:https://stackoverflow.com/questions/29865863/how-to-move-folder-files-with-path-names-255-characters-in-windows-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!