-snh in 7-zip paker option

English support forum

Moderators: petermad, Stefan2, white, Hacker

Post Reply
Hurdet
Power Member
Power Member
Posts: 746
Joined: 2003-05-10, 18:02 UTC

-snh in 7-zip paker option

Post by *Hurdet »

When I use
"c:\Program Files\7-Zip\7z.exe" a -t7z -snh "c:\archive.7z" "c:\abc"
it preserve hardlink.
If I add -snh in Extra parameter 7-zip paker option
it not preserve hardlink.
why?
User avatar
white
Power Member
Power Member
Posts: 6685
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: -snh in 7-zip paker option

Post by *white »

Have you read the help?
[Help - Configuration - 7-ZIP Packer] wrote: Extra parameters Allows to pass extra parameters both to the internal 7-Zip packer and external 7-Zip. The internal packer only supports extra parameters starting with -m, plus the following: -slp (set large page mode), -stl (set archive date to that of the newest file), -v (volume size). It supports both the long form like -mx=9, the short form -mx9 and the default form -mx without parameter. The 7-Zip dll will then use the default value for that parameter, e.g. -mx is the same as -mx=9.
User avatar
Dalai
Power Member
Power Member
Posts: 10281
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: -snh in 7-zip paker option

Post by *Dalai »

Are you sure that it works? The 7-Zip help states this:

Code: Select all

-snh    Store hard links as links (WIM and TAR formats only)
Based on this, one can't assume that storing hard links works for .7z archives.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Hurdet
Power Member
Power Member
Posts: 746
Joined: 2003-05-10, 18:02 UTC

Re: -snh in 7-zip paker option

Post by *Hurdet »

Dalai wrote: 2026-04-21, 18:12 UTC Are you sure that it works? The 7-Zip help states this:

Code: Select all

-snh    Store hard links as links (WIM and TAR formats only)
Based on this, one can't assume that storing hard links works for .7z archives.
7z.exe -h not show limit.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52639
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: -snh in 7-zip paker option

Post by *ghisler(Author) »

It should work when unchecking "Use internal 7-Zip packer" and "Prefer 7-Zip plugin if installed". Then Total Commander will use the 7-Zip executable defined behind "7-Zip packer:".
Author of Total Commander
https://www.ghisler.com
Post Reply