English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.Apps (https://eab.abime.net/forumdisplay.php?f=8)
-   -   Dopus LHA woes (https://eab.abime.net/showthread.php?t=74923)

Ian 29 August 2014 13:51

Dopus LHA woes
 
I am trying to do a mass extraction of some WHDLoad installs, problem is some of them (Rather stupidly it has to be said) have the same folder name inside the archive (The collection of megademos seems to be the problem right now)

I have no problem getting them extracted using dopus 4.12, but I cannot for the life of me get it to create a new folder for each archive it extracts.

So my Amigados command is as follows (Which works)

LHA X {f} {d}

However

LHA X {f} {d}/{f} (I have tried using {o} here too, makes no difference)

just extracts the files into the same folder, and adding a trailing slash makes no difference either.

Is there anyway to actually do what I want?

Korodny 29 August 2014 21:38

Quote:

Originally Posted by Ian (Post 972914)
LHA X {f} {d}/{f} (I have tried using {o} here too, makes no difference)

You are just specifying a target directory that doesn't exist - but that's not going to force LhA to create it. Actually, I don't think there's a way to have LhA create a new directory.

What you do instead is to have Opus create the directory before you invoke LhA. Any DOpus action (button, menu entry etc.) can invoke several commands in a row, not just one.

Also, your path is invalid: {d}{f} results in something like path_of_right_window/path_of_left_window/filename - what you want is {d}{o} without any slashes in between. And you should always use quotes around paths (i.e."{d}{o}"), to avoid problems with spaces in file and directory names.

So make your action look like this:

AmigaDOS: makedir "{d}{o}"
AmigaDOS: lha x "{f}" "{d}{o}"

This should have the desired effect.

(Note that it's been a while and I don't have the Amiga running right now - this is all from memory)

Ian 29 August 2014 22:14

1 Attachment(s)
Thanks for your help, but unfortunately it doesn't work. (The makedir line works fine on it's own, just not with the LHA part following it)

I can get something to work using just the LHA line, but again this causes something to happen that isn't required.

Using lha x "{f}" "{d}{o}" doesn't produce anything, if I add a trailing slash after the {o} it extracts, but it creates a folder with the name of the previous lha and extracts the next one inside it. (see attached)

I am a total novice on this so have no idea whats going on.

Korodny 30 August 2014 00:29

Quote:

Originally Posted by Ian (Post 973011)
Thanks for your help, but unfortunately it doesn't work. (The makedir line works fine on it's own, just not with the LHA part following it)

I forgot a trailing slash in the second line:

AmigaDOS: makedir "{d}{o}"
AmigaDOS: lha x "{f}" "{d}{o}/"

This should create a new directory in the target window, then extract the selected archive into this new directory.

Quote:

Using lha x "{f}" "{d}{o}" doesn't produce anything, if I add a trailing slash after the {o} it extracts, but it creates a folder with the name of the previous lha and extracts the next one inside it. (see attached)
I thought that's what you want to achieve?

Ian 30 August 2014 00:42

That is what I want but look at the attachment. The directory it extracted into is not the same as the archive name. The sound demo was extracted into the sound 2 directory.

I tried the top 4 lha files 2 of them are directory names and the other two have been extracted into them.

Edit: I figured it out I needed to use {fu} to stop it deselecting the first file .

Lha can create directories too so there's no need fit the make dir command.

Couldn't have done it without your advice though so thanks.


All times are GMT +2. The time now is 10:28.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04140 seconds with 10 queries