unzipping can run into a "Path too long" error

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:
Post Reply
autocart
Posts: 1380
Joined: 26 Sep 2013 15:22

unzipping can run into a "Path too long" error

Post by autocart »

Hi Don,

I usually use 7-zip. Maybe that's why I never noticed it.
But using XY's build-in zip commands from the context menu of a zip file to unzip it to a (new) subfolder where some file's path ends up being overlong, runs into a 0x80010135 error: "Path too long".

I expected that especially XY's build-in commands would never run into a path too long error since this is part of the advertising that XY could handle overlong file paths. Interestingly, 7-zip shows no such issue.

regards, auto

highend
Posts: 14939
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: unzipping can run into a "Path too long" error

Post by highend »

XY uses Win inbuilt zip for these commands, not its own implementation. If on 10+, set long path support and reboot, maybe that helps (https://www.microfocus.com/documentatio ... gpfz7.html)
One of my scripts helped you out? Please donate via Paypal

autocart
Posts: 1380
Joined: 26 Sep 2013 15:22

Re: unzipping can run into a "Path too long" error

Post by autocart »

That is a good tip, thank you. Unfortunately, I do not have the rights to change that setting on my office computer.

Horst
Posts: 1382
Joined: 24 Jan 2021 12:27
Location: Germany

Re: unzipping can run into a "Path too long" error

Post by Horst »

Reading your post, it looks like you have 7-zip available on your machine.
Why don't you use 7-zip for all unpacking ?
I use this script, on a button, to unpack into the other pane for all archive formats.

Code: Select all

// Extracts the selected archive(s) to the inactive pane using 7-Zip.

// Check if there's at least one (archive) file selected

   $selected    = <get SelectedItemsPathNamesSlashed>;
   $cntSelected = gettoken($selected, "count", <crlf>);
   end ($cntSelected == 0), "No (archive) file(s) selected, aborted!";

   $cntFiles = gettoken(formatlist($selected, "f", <crlf>, "!*\"), "count", <crlf>);
   end ($cntSelected != $cntFiles), "Folder(s) can't be selected, aborted!";

   foreach($item, $selected, <crlf>, "e") {
        if (exists($item) == 2) { continue; }

    $other = get("path", i) . "\";
    Run("""C:\Program Files\7-Zip\7zG.exe"" x ""$item"" -o""$other""");
    };
Windows 11 Home, Version 25H2 (OS Build 26200.8655)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1415b (x64), Everything Toolbar 2.4.0, Listary Pro 6.3.6.99

Post Reply