Bug opening files with overlong paths (259+ characters)

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
xyMOREr
Posts: 1
Joined: 08 Nov 2025 01:07

Re: Bug opening files with overlong paths (259+ characters)

Post by xyMOREr »

Preamble: I have resolved this problem, am posting this here in the interest of others. I know this does not follow the thread, but this is the nearest forum topic I can find. Consider this a useful footnote if you will:

Context:
  • XYPlorer 27.20.0200 (32 bit), Support overlong filenames is ticked in the config.
  • OS Name: Microsoft Windows 10 Pro
  • OS Version: 10.0.19045 N/A Build 19045
  • System Type: x64-based PC
Issue:
I ran a Custom Copy using XYplorer of a number of files and at the end XYplorer reported several FAIL messages such as this one:
FAIL (other reasons) New F:\Carson\GoodSync Backup\Users\Carson\WinDevel\JSIL\JSIL.Libraries\node_modules\gulp\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\load-json-file\node_modules\parse-json\node_modules\error-ex\index.js -> C:\Users\carson\WinDevel\JSIL\JSIL.Libraries\node_modules\gulp\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\load-json-file\node_modules\parse-json\node_modules\error-ex\index.js | The system cannot find the path specified.

Resolution:
After considerable research I discovered that the errors had to do only with the longest pathnames being copied. I further discovered a well-documented problem where the Windows API fails to create pathnames longer than 260 characters (for the record, it's slightly more complicated than that). This is documented by Microsoft here..

I then configured my Windows 10 installation to Enable Win32 Long Paths (by changing the Group Policy setting from Not configured to Enabled as shown in the foregoing MS article).

I then retried the failed copy and the resulting error was identical.

I then exited XYExplorer and restarted it. Now the copy succeeded, copying a folder and all its contents.

admin
Site Admin
Posts: 66069
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

Thanks for the tip!

I wonder if this is maybe a Windows 10 thing? I can Custom Copy overlong paths without problem in Win8.1 and Win11 both being without that LongPathsEnabled=1 bit.

It is (or should be) handled via manifest XYplorer.exe and XYcopy.exe:

Code: Select all

<!-- Support overlong paths on Windows 10 and later. -->
<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>

Post Reply