I tried to use powershell command copy-item
as xcopy
to copy content of one disk to another one.
copy-item -Path h:\* -Destination g:\ -Recurse -Force
However, I encountered the following errors:
Copy-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
I got these errors enough to discourage manually search and copy files or folders with long paths. What is the best way to avoid this problem?