Saturday, 25 May 2019

windows - File name too long when copying to a directory with shorter file path

This is weird.


I have a meanJs installation, the contents of which I copied to another folder.


Original folder path: C:\work\defaults\mean_0.3.3


File contents copied to: C:\work\defaults\a


As you can see it's obvious that the file contents are copied to a folder with a shorter name, so the file name too long error should not come, yet it does.


Is this a windows 10 bug?


Tried to do the it with copy-item command on the powershell and this is part of the output (it goes on for a while):


PS C:\work\defaults> copy-item .\mean_0.3.3\ -destination .\b -recurse
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.
At line:1 char:1
+ copy-item .\mean_0.3.3\ -destination .\b -recurse
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (test-delayed-http-upload.js:FileInfo) [Copy-Item], PathTooLongException
+ FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand

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.
At line:1 char:1
+ copy-item .\mean_0.3.3\ -destination .\b -recurse
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (test-delayed-stream-auto-pause.js:FileInfo) [Copy-Item], PathTooLongExceptio
n
+ FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand

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.
At line:1 char:1
+ copy-item .\mean_0.3.3\ -destination .\b -recurse
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (test-delayed-stream-pause.js:FileInfo) [Copy-Item], PathTooLongException
+ FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...