Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, January 18, 2018 5:56 PM
Windows 10 Pro x64
Copying was initiated by dragging a folder from the root of the source drive to the root of the target drive.
Both the source and the target drive are 4TB with GUID Partition Tables.
The path length is 182 characters. The file name length is 44 characters.
Why is there a problem with the path length?
All replies (11)
Thursday, January 18, 2018 6:51 PM
In the Registry Editor, use the left sidebar to navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
On the right, find a value named LongPathsEnabled
and double-click it. If you don’t see the value listed, you’ll need to create it by right-clicking the FileSystem
key, choosing New > DWORD (32-bit) Value, and then naming the new value LongPathsEnabled
.
In the value’s properties window, change the value from 0 to 1 in the “Value data” box and then click OK.
You can now close Registry Editor and restart your compute
Please remember to click “Mark as Answer” on the post that helps you,This can be beneficial to other community members reading the thread.
Thursday, January 18, 2018 6:52 PM
In Windows 10 Pro or Enterprise, hit Start, type gpedit.msc, and press Enter.
In the Local Group Policy Editor, in the left-hand pane, drill down to Computer Configuration > Administrative Templates > System > Filesystem. On the right, find the “Enable win32 long paths” item and double-click it.
In the properties window that opens, select the “Enabled” option and then click “OK.”
Please remember to click “Mark as Answer” on the post that helps you,This can be beneficial to other community members reading the thread.
Friday, January 19, 2018 10:24 PM
Didn't help. Besides the length of the path and filename was only 226 characters.
Friday, January 19, 2018 10:25 PM
Didn't help. Besides the length of the path and filename was only 226 characters.
Monday, January 22, 2018 9:51 AM
You can use some tool like copy, xcopy or something to rename the destination file before it gets copied.
You can try Robocopy:
The Robocopy command line utility, which is natively deployed with Server 2008 and server 2012, will overcome the Windows API limit and allow the copying of files / folder paths longer than 255 characters.
A sample command is included below:
robocopy SOURCE(MountPoint) DESTINATION(Production data path) /E /ZB /COPYALL /DCOPY:DAT /log:C:\LOG.TXT /NJH /TEE
Explanation of Robocopy switches
/E to copy everything including empty folders
/ZB to copy files in restartable mode (to survice a network glitch), then if it fails uses backup mode
/COPYALL copies everything including ACLs
/DCOPY:DAT copies all directory information including timestamps and attributes
/LOG:C:\log.txt outputs all information into a log file
/NJH hides the job header
/TEE also outputs to the screen
Or you can use a symbol link https://theitbros.com/destination-path-too-long-error-when-movingcopying-a-file/
Note: this is a 3rd party link, we don't have any warranties on this website. It's just for your convenience
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Tuesday, January 23, 2018 6:59 AM
That does not explain why Explore cannot copy a file with a combined path/filename length of 226.
Tuesday, January 23, 2018 9:27 AM
Hi,
How did you count the characters?
If the above suggestions work on the issue, please let me know.
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Tuesday, January 23, 2018 8:45 PM
>How did you count the characters?
Using Explorer copied the path on the source machine and the file name.
Used the len function in a VBA debugging window:
?Len(<path>)
?Len(<file name>)
Wednesday, January 24, 2018 9:47 AM
Hi,
As far as I am concerned, there are limitations on the nesting level of subdirectories. It also depends on the file system you are using, are you using NTFS?
You can refer to
https://stackoverflow.com/questions/494730/how-many-sub-directories-should-be-put-into-a-directory
If you don't mind to upload the entire folder path, we can have a test on our test machine.
Thank you for your corporation.
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Wednesday, January 24, 2018 9:58 AM
Hi,
You said that you count source path length, but what about destination? Try to copy to root folder on USB
Monday, March 5, 2018 11:44 PM
I recommend trying a tool called: long path tool