Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
114 user(s) are online (63 user(s) are browsing Forums)

Members: 1
Guests: 113

emeck, more...

Headlines

 
  Register To Post  

LhA extract
Just popping in
Just popping in


See User information
Let's say I am in RAM: and I have an LhA archive. I want to extract 1 file from it that is a few drawers deep.

LhA x RAM:archive.lha Drawer1/Drawer2/TheFile RAM:

This works, but it makes the 2 drawers first then puts TheFile in them (full path extracted).

Using 'LhA e' I hoped would not create the drawers, just put TheFile in RAM: root.

I also tried 'LhA -x0 e' but that doesn't extract anything.

Is there a way to do this?


Edited by mritter0 on 2016/4/15 4:27:38
Go to top
Re: LhA extract
Home away from home
Home away from home


See User information
@mritter0

I don't think that is possible unfortunately.

While there is an option to "-x Preserve and use path names" they forgot to add one to truncate any remaining pathes.

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: LhA extract
Just can't stay away
Just can't stay away


See User information
@mritter0

try:

LhA p -qN RAM:archive.lha Drawer1/Drawer2/TheFile >ram:TheFile

This almost works but adds \n-------------> END OF FILE <-------------\n to the file, theoretically if it's an exe it shouldn't hurt, the example program I extracted worked ok.

You're other option is a small dos script eg.

.key archive,file
.bra {
.ket }
lha x {archive} {file} ram:
move ram:{file} ram:
delete ram:{file} all force

This will leave a few emtpy drawers lurking in ram: but at least they don't take up any space.


A neater way is to use dopus5 and xad to open the archive in a lister and just copy the file you want where you want. or use xadfilesystem do mount the archive as a partition and do the same.

Maybe XADUnFile might work, I've not tried that though.

Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: LhA extract
Just popping in
Just popping in


See User information
@mritter0

IIRC, you should use

LhA -x2 RAM:archive.lha Drawer1/Drawer2/TheFile RAM:

to get what you want.

Go to top
Re: LhA extract
Just can't stay away
Just can't stay away


See User information
@whose

Ahhh... I was only looking at the help text in the program and not the badly but properly designed guide file, the index function is so rarely used I keep forgetting about it, maybe I should redisgn it a little, you almost got it right, it needs an 'e'...

LhA e -x2 RAM:archive.lha Drawer1/Drawer2/TheFile RAM:

Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: LhA extract
Just popping in
Just popping in


See User information
@Severin

Ah, missed the "e", right... I´m getting old, I think

Go to top
Re: LhA extract
Just can't stay away
Just can't stay away


See User information
@whose

I think I am too but a can't really remember

Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: LhA extract
Just can't stay away
Just can't stay away


See User information
@Severin

Yeah, there are three things we get worse at when we get old:

- Remembering
- Hearing
- Remembering

IIRC

Best regards,

Niels

Go to top
Re: LhA extract
Just popping in
Just popping in


See User information
-x2 got it. Thanks

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project