Welcome, Guest. Please login or register.

Author Topic: lha return codes  (Read 4390 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show all replies
lha return codes
« on: February 07, 2015, 03:05:47 AM »
what does "lha failed returncode 20" and similar mean?
Better sorry than worry.
 

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show all replies
Re: lha return codes
« Reply #1 on: February 07, 2015, 03:58:08 AM »
lha fails on some archives only, executing script, with code 10 or 20.
seems that 20 happens when filename contains nonstandard-ASCII char. but what is 10?
strangely, with error 10, it fails only in script.
thanks.
Better sorry than worry.
 

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show all replies
Re: lha return codes
« Reply #2 on: February 07, 2015, 04:43:11 AM »
Quote from: Tenacious;783237
10 is a script failure.  The codes are not clearly defined in the manual.  Do you have a manual?  Can you list the script here?


its very simple, albeit long, script:
"

makedir RAM:lhat
lha x -a -r -e -x -M -m -n -q  "PC:lha/dir1/archive1.LHA" RAM:lhat/
lha a -a -r -e -x -M -n -q -z  "PC:lha_out/dir1/archive1.LHA" RAM:lhat/
delete  RAM:#? ALL FORCE QUIET

...
"
er, didn't know there was difference between cli and shell, think this is from cli.

edit: it seems there's a problem in filename. it says "Unable to open output file". is there a way to use utf-8 in cli?
« Last Edit: February 07, 2015, 04:54:16 AM by orange »
Better sorry than worry.
 

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show all replies
Re: lha return codes
« Reply #3 on: February 07, 2015, 04:43:33 PM »
I'm trying to unarchive each .lha and then repack it in .lha but with zero compression. Later I can pack them all again with 7z, for eg., to achieve (much) higher compression ratio. I've written a perl script that creates this script for every .lha. Because some archives are inside archives, I've done this recursively to second level. But there's a lot of filenames with nonASCII.
Better sorry than worry.
 

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show all replies
Re: lha return codes
« Reply #4 on: February 08, 2015, 06:35:48 AM »
Quote from: Thomas;783280
10 and 20 mean nothing. They are just standard AmigaDOS return codes for error resp. failure. You have to read the error messages Lha prints out. Don't use >nil: or similar to hide the messages if you need them.


Thanks Thomas.

After doing some tests, I think the aminet archive could be reduced in size to less than 50% with this method.
Better sorry than worry.