Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: orange on February 07, 2015, 03:05:47 AM
-
what does "lha failed returncode 20" and similar mean?
-
Does it do it on every archive? Using the right version for your processor?
-
In AmigaDos, a return code of 20 means a command failed and was aborted. 4-3 of "AmigaDOS" manual.
Are you working from a cli or shell?
Jeepers, Mike never sleeps! ;)
-
Jeepers, Mike never sleeps! ;)
Lucky me, just got home from work. Before midnight for once! No big roller derby party this weekend, it's NASA documentaries and amiga.org for me, this exciting Friday night, instead. ;)
Now on to the guy's problem, I'd ask the usual questions. Did lha work previously (and just now stopped working), or is this the first time using it? What sequence of commands is he putting into it? Does it work if he copies it to ram:, etc. There's so many ways to troubleshoot this, but without more information it's kind of hard. ;)
-
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.
-
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.
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?
-
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?
-
"
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?
WOW! That's definitely more sophisticated than the way I unarchive stuff (I simply use a menu button in my favorite dir utilities). Clearly, I'm out of my depth, but interested. Did you write this script, and if so, what is the intent behind the intricacy? How do you substitute the name of the archive you are extracting? It's great to see how others do things. ;)
I asked about the cli or shell to find out if you were fat-fingering a command each time.
-
IIRC, my 'button' unarchives a selected file.lha to my RAM DISK: and gives it a name (output file) and directory structure that the archive dictates.
I probably don't understand what you're doing.
-
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/
I just looked up about half of those options, and definitely... wow!
+1 curious as to what you're trying to do?
-
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.
-
I can be very little help here, as I too cheat - using DiskMaster 2 and just mashing the button to un-arc the archive. Thee programs can make us quite lazy, can't they..... (but they're fast)
But, Orange, if you don't have the manual - you can grab a copy at Bombjack.org in PDF format.
-
Like many here, you're operating beyond my simple user status. :)
@ motrucker Thanks for the link. I'll check it out, too.
-
That's a very impressive repository, even Rob Peck's "The Amiga Companion" is there!
-
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.
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.
-
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.
-
After doing some tests, I think the aminet archive could be reduced in size to less than 50% with this method.
Neat project, but why would you do this? LHA has been the standard archive format for Amiga's for something like 20 years, and everybody has it. I wouldn't even know what to do with a 7z compressed file on my Amiga. And it's not like hard drive space is expensive, even the entire Aminet isn't that big in the grand scheme of things, anymore. :huh:
Oh well, good luck anyway! :)