Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very long path name - how to copy files?
Message
 
 
To
All
General information
Forum:
Windows
Category:
Computing in general
Title:
Very long path name - how to copy files?
Miscellaneous
Thread ID:
01673974
Message ID:
01673974
Views:
59
Hi everybody,

How can I verify that I correctly copied a huge directory into another directory?

I used git bash command like this

cp -r ComplexDirFromOneDrive ComplexDirOnAnotherDrive

When I open properties for original and new one in Windows Explorer, it seems like the new one is bigger than original (see attached).

How can I make sure that I copied all files accurately and didn't somehow added new files or copied them more than once?

Thanks in advance.

UPDATE. Perhaps in addition to Windows Explorer I can install something else which doesn't have the same limitation as Windows Explorer if I don't want to mess with the registry?
Also, if I try to view any of the directories in the Windows Explorer, I don't see any files (I supposed due to this very long directory structure). I saw that I can try to set some flag to see them, e.g.

https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation

Enable Long Paths in Windows 10, Version 1607, and Later
Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. However, you must opt-in to the new behavior.

To enable the new long path behavior, both of the following conditions must be met:

The registry key HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled (Type: REG_DWORD) must exist and be set to 1. The key's value will be cached by the system (per process) after the first call to an affected Win32 file or directory function (see below for the list of functions). The registry key will not be reloaded during the lifetime of the process. In order for all apps on the system to recognize the value of the key, a reboot might be required because some processes may have started before the key was set.

Note

This registry key can also be controlled via Group Policy at Computer Configuration > Administrative Templates > System > Filesystem > Enable Win32 long paths.

The application manifest must also include the longPathAware element.

XML
<application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
        <ws2:longPathAware>true</ws2:longPathAware>
    </windowsSettings>
</application>
but these instructions are not very clear, besides, I'm working using RDP, so I don't want to re-boot.

What are my simplest options to make sure I copied all files correctly (my colleague thinks that the extra files are most likely "thumbs.db")?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform