Question about way to Pack lha files.

English support forum

Moderators: Hacker, petermad, Stefan2, white

olesio
Junior Member
Junior Member
Posts: 54
Joined: 2009-01-22, 15:29 UTC
Location: Poland

Question about way to Pack lha files.

Post by *olesio »

Hello. Is any method to pack long file names with spaces to lha format?
I tryed 32 bit japaneese lha from link at http://ghisler.com/tools.htm but
it do not support long file names with spaces and long directories name.
Only way is use WinUAE and pack files using Amiga lha in Workbench?
Best regards: olesio
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have just tried it with the Japanese lha32.exe, and long names with spaces were packed without problems, both files and folders. lha32.exe is from 1996(!) and I'm using XP SP3. Do you get any error message?
Author of Total Commander
https://www.ghisler.com
olesio
Junior Member
Junior Member
Posts: 54
Joined: 2009-01-22, 15:29 UTC
Location: Poland

Post by *olesio »

I downloaded lha32.exe from link which you gave on
http://ghisler.com/tools.htm and rename it to lha.exe
and placing in directory which is in patch. For sure I do
copy of totalcmd.exe to other directory and run it with
default configuration (without copy wincmd.ini file) and
after check a lha.exe is set in options I selected a file
with name CC Longest Day Workbook v13.xls, then I
pressed Alt+F5 and select LHA Packer and get warrning
MessageBox with message "User abort". And even when
I selected file with name dsound_crossfade_howto.txt
there was the same problem. My version of LHA can only
pack files with shortnames. But when I packed directory
with name VISUALIZATION PLUGIN in archive (with LZH
extension as output filename) there was directory called
Visual~1 and I cannot unpack it. Can you upload on some
web your version of lha or tell me what to do - to pack a
lha in correct way? I even tried add "%1" after lha.exe in
packer configuration but it does not help. I have probable
default lha.pif file in WINDOWS directory installed by TC.
But when I Packed !FTPSERV directory with subdirectories
and files named ftp_log-20090829 etc - file was packed
fine but empty sudirectoried was not included in archive.
Please exmplain me how to pack to lha without erros.
Thanks in advice And I'm sorry for my very bad english.
Best regards: olesio
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please don't rename lha32.exe. Just put it in a directory with its files, and then choose it in Configuration - Options - Packer. That's how I did it, and it works just fine when packing with Alt+F5.
Author of Total Commander
https://www.ghisler.com
olesio
Junior Member
Junior Member
Posts: 54
Joined: 2009-01-22, 15:29 UTC
Location: Poland

Post by *olesio »

Just put it in a directory with its files
I downloaded once again lha32 from TC site link and unpack all content
(lha32.exe, unlha32.dll and readme.txt files) to directory in patch and
set packer filename in configuration as lha32.exe and try to pack a file
with long name in Alt+F5 dialog and I got the same error, aborted by
user, maybe you have some different version of lha from somewhere?
I do not have idea what I do wrong. I tryed with clean version. Look
at my screenshots at http://tinypic.com/olesio Do you have solution?
Best regards: olesio
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, olesio.

Should the configuration - packer not specify the complete pathname to lha32.exe? At minimum doing so would be on the safe side.

Kind regards,
Karl
olesio
Junior Member
Junior Member
Posts: 54
Joined: 2009-01-22, 15:29 UTC
Location: Poland

Post by *olesio »

You mean i should gave full path? I did it but I got the same error.
Because when program is in path in most cases giving full patch is
not required. Anyway I still have problem with lha. Any new idea?
Best regards: olesio
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Christian.

I can reproduce olesio's problem.

+ I downloaded LHA32 v2.67, dated 1995-10-07 (Japanese version).
+ The 3 files were put in the folder C:\programme\lha32.
+ In the packer configuration dialogue the executable file was selected: C:\programme\lha32\lha32.exe.

Now everytime I try to add a file having a long filename (not conforming to the old 8.3 rule) to an .LZH file, LHA32.exe pops up a cmd.exe window briefly and I receive an error message stating I had aborted the operation.

Running the same operation at the cmd.exe command prompt, however, works fine:
C:\programme\lha32\Lha32.exe a C:\temp\testing.lzh Some_Long_Filename.PNG
Total Commander 7.55 pb2
Windows XP Prof SP2, 32bit.

P.S.:
No matter which LHA32 version I use, adding long filenames to LZH file never works. (the one from your webpage, dated 1995, or the one from the Japanese webpage, dated 1996).
They both fail here:
+ the older version throws an error message.
+ the newer version fails silently.

Kind regards,
Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, I just started lha32.exe here in a DOS box, and it says version 1.06. I can provide this version if it would help you.
Author of Total Commander
https://www.ghisler.com
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Christian.

V1.06 is the newer LHA32 version by Tuca which fails here silently. But maybe it does its job for olesio.

Cheers,
Karl
olesio
Junior Member
Junior Member
Posts: 54
Joined: 2009-01-22, 15:29 UTC
Location: Poland

Post by *olesio »

Thank you karlchen. This version works fine for me. It only do not pack
empty directiores. In Amige version was -e switch I do not seen it here.
Best regards: olesio
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Re: Question about way to Pack lha files.

Post by *Sir_SiLvA »

Sorry to dig up this long forgotten post, which I came accross when looking for a way to work with tc and .lha-files:

@Christian:
1) On your Tools Page (https://www.ghisler.com/tools.htm)
-> External packers -> LHA for Win32 -> the link "Packer Homepage (in Japanese, download-link in English)"
aka https://www.asahi-net.or.jp/~GI8S-TKUC/ is dead :-/ and I didnt find a replacement.

2) When I tried to delete a folder from a lha-archive TC told me
[string 627="Cannot find external pack program! You need to install and configure an external packer to handle this specific archive."]
which is the wrong message as %COMMANDER_PATH%\PlugIns\Packer\Exes\LHA.EXE exists BUT it can
just not be executed under windows 10 (64bit?). Any chance for a fix here? or is this a thing translators should include in 627?

3) with the lha32.exe I can delete folders from lha archives BUT the lha32.exe gives me a (Y/N) dialog - any chance you can pass a parameter to lha32.exe to skip the second delete confirmation?

Thanks for reading,
Hoecker sie sind raus!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6973
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Question about way to Pack lha files.

Post by *Horst.Epp »

Have you tried this one ?
https://sourceforge.net/projects/gnuwin32/

Code: Select all

C:\Temp\Test\f3>lha
LHarc    for UNIX  V 1.02  Copyright(C) 1989  Y.Tagawa
LHx      for MSDOS V C2.01 Copyright(C) 1990  H.Yoshizaki
LHx(arc) for OSK   V 2.01  Modified     1990  Momozou
LHa      for UNIX  V 1.00  Copyright(C) 1992  Masaru Oki
LHa      for UNIX  V 1.14  Modified     1995  Nobutaka Watazaki
LHa      for UNIX  V 1.14i Modified     2000  Tsugio Okamoto
                   Autoconfiscated 2001-2005  Koji Arai
usage: lha [-]<commands>[<options>] [-<options> ...] archive_file [file...]
  commands:  [axelvudmcpt]
  options:   [q[012]vnfto[567]dizg012e[w=<dir>|x=<pattern>]]
  long options: --system-kanji-code={euc,sjis,utf8,cap}
                --archive-kanji-code={euc,sjis,utf8,cap}
                --extract-broken-archive
                --help
                --version
commands:                           options:
 a   Add(or replace) to archive      q{num} quiet (num:quiet mode)
 x,e EXtract from archive            v  verbose
 l,v List / Verbose List             n  not execute
 u   Update newer files to archive   f  force (over write at extract)
 d   Delete from archive             t  FILES are TEXT file
 m   Move to archive (means 'ad')    o[567] compression method (a/u/c)
 c   re-Construct new archive        d  delete FILES after (a/u/c)
 p   Print to STDOUT from archive    i  ignore directory path (x/e)
 t   Test file CRC in archive        z  files not compress (a/u/c)
                                     g  Generic format (for compatibility)
                                        or not convert case when extracting
                                     0/1/2 header level (a/u/c)
                                     e  TEXT code convert from/to EUC
                                     w=<dir> specify extract directory (x/e)
                                     x=<pattern>  eXclude files (a/u/c)

Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Re: Question about way to Pack lha files.

Post by *Sir_SiLvA »

Horst.Epp wrote: 2023-05-12, 16:50 UTC Have you tried this one ?
now that I have I can tell you that it doesnt work. When you try to delete a file from an archiv with that version you get the error as describe a few posts up (LHA.exe pops up a cmd.exe window briefly and I receive an error message stating I had aborted the operation.)
Last edited by Sir_SiLvA on 2023-05-12, 18:53 UTC, edited 1 time in total.
Hoecker sie sind raus!
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: Question about way to Pack lha files.

Post by *Gral »

You can find original distribution from https://www.asahi-net.or.jp/~GI8S-TKUC/ e.g. here http://sta.c64.org/winprg/lha32106.zip
But it needs to work UNLHA32.DLL - not included.
You can get full package here - http://gral.y0.pl/tc/lha32.zip\

Look also here for various versions - ftp://ftp.elf.stuba.sk/pub/pc/pack/
Post Reply