unzipping can run into a "Path too long" error

Things you’d like to miss in the future...
Post Reply
autocart
Posts: 1318
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: 14105
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: 1318
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: 1220
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 24H2 (OS Build 26100.3915)
Portable XYplorer (Actual version, including betas)
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2, Listary Pro 6.3.2.88

Post Reply