10 June 2020, 08:10 | #1 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
XAD commands
Set up dopus to do all sort of nice things and I need some help with XAD commands. Usage of Xadunfile and xadundisk is pretty straight forward but I want xadunfile to create a directory (Same as the adf filename or to ask me for it) when unarchiving an adf file for example and not just dump everything into Ram let’s say. What would the command be for it? I tried XadUnfile {f} RAM: DIMG which is fine and extracts the adf or dms to ram. But what can I add in order to create the extraction in a dir (same as the adf or dms name) in ram? I know that xadunfile has extra commands like destdir and askmakedir for that reason but can’t figure out how to add them. Tried few ways but fails.
Last edited by npagonis73; 10 June 2020 at 08:27. Reason: Added some info |
10 June 2020, 13:29 | #2 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
Just an example and you have to make sure that no strange things will happen:
Code:
xadUnFile {fu} DEST RAM:{o} NOABS ASKMAKEDIR |
10 June 2020, 13:33 | #3 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Thanks Daxb, i will give it a go and report back.
|
10 June 2020, 14:09 | #4 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Unfortunately it fails and gives no result. I keep experimenting....
|
10 June 2020, 15:40 | #5 |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,006
|
I once made this kind of AmigaDOS script for unarchiving adf files to a selected destination. It accepts adf filename as an argument and then it creates dirs with adf names to the destination where it unarchives them. Maybe there would be a simplier solution too, but if you want to test or play around:
Code:
.KEY FILE If EXISTS "<FILE>" If EXISTS ENV:rnounadfd Set defdir $rnounadfd Else Set defdir "RAM:" EndIf C:RequestFile DRAWERSONLY TITLE "Select destination..." DRAWER="$defdir" > ENV:rnounadfd If NOT WARN CD $rnounadfd List "<FILE>" LFORMAT="%M" > ENV:rnounadff C:XADUnFile "<FILE>" "$rnounadff" DIMG Delete ENV:rnounadff >NIL: Else Delete ENV:rnounadfd >NIL: EndIf UnSet defdir EndIf |
10 June 2020, 16:56 | #6 | |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Quote:
In the meantime what i found is the following: 1) xadunfile {fu} DESTDIR "RAM:{o}/" DARC The above extracts a dms file and creates a folder in ram which has the same name as the dms file. Changing the DARC command with DIMG, it extracts adf files. 2) If you don't want automatic folder creation and you want to create your own then swap the "RAM:{o}/" with "{Rd}/" and a requester will come up and you choose where you want it extracted. Now back to Jpv script to experiment. Last edited by npagonis73; 10 June 2020 at 16:57. Reason: Mistake |
|
10 June 2020, 17:00 | #7 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
|
10 June 2020, 17:43 | #8 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
|
10 June 2020, 22:26 | #9 | |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Quote:
|
|
10 June 2020, 22:37 | #10 | |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Quote:
After trying again I have the following: 1)ASKMAKEDIR doesn’t work for me. Really want to know how to make this option command to work 2)I do have output window as a flag 3)Without the command DARC OR DIMG at the end again it doesn’t work If you see above How I made it work, the first half is as you say but the second part differs. I tried many versions of your commands which helped me reach a doable solution. I would really like to learn though how askmakedir works cause it seems easier!! |
|
11 June 2020, 01:15 | #11 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
|
I did some tests and the attached commands work well on Dopus4, see video:
https://drive.google.com/file/d/1_11...ew?usp=sharing Unpack ADF to RAM: xadUnFile {fu} DEST RAM:{o} DIMG or UnADF {f} DEST RAM: Unpack DMS to RAM: xadunfile {fu} DESTDIR "RAM:{o}/" DARC Write ADF on DF0: C:ADF2Disk {f} Write DMS on DF0: DmsDir.dopus {p} {o} Last edited by AMIGASYSTEM; 11 June 2020 at 01:59. |
11 June 2020, 07:39 | #12 | |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,006
|
Quote:
Like this: Code:
Function : AmigaDOS Execute S:RNOUnADF.script {f} Flags : Output to window Run asynchronously Window close button Code:
Function : Script S:RNOUnADF.script {f} Flags : Output to window Run asynchronously Window close button |
|
11 June 2020, 07:57 | #13 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
AmigaSystem and JPV thanks a lot for your help and guidance. Appreciated!!! Have a good day
|
11 June 2020, 11:47 | #14 | |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
Quote:
I only tested with a single LHA archive. I do not have disk images. If the keywords DISKIMAGE or DISKARCHIVE are needed for ADF/DMS I do not know. You have to try. If you have a working Shell solution without the DOpus stuff you just need to adapt it. More or less only {fu} and {o} at the right places and the mentioned options checked. See also DOpus documentation. |
|
11 June 2020, 19:14 | #15 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
XAD commands
Guys again thank you all for your help!! It all works great.
I have one last thing to ask about a strange behavior with xad under 3.9 compared to xad under 3.1.4. Executing all above commands and scripts which use xad, under 3.9 (either in dopus or xvoodo2 which also use xad) and extracting any type of file lha, zip or adf and dms, you see the progress window extracting the files and then 1-2 files towards the end it stops (not freeze) and it takes 3-4 minutes to finish. Same procedure on the same A1200 with ACA but under 3.1.4 takes only 5 seconds. This happens only if you use xad for extraction. Any other commands like lha or unzip or lzx or rar or extracting dms and adf with different commands, then it takes normal time!!! Any ideas? |
11 June 2020, 21:54 | #16 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
|
I don't think it depends on OS 3.1.4, on WinUAE XAD even with OS 3.1.4 it behaves the same way, it may be that it stops for a check file!
Last edited by AMIGASYSTEM; 11 June 2020 at 22:45. |
06 September 2020, 23:21 | #17 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Hello everyone. I am back to this post with another question.
The below is jPV's script for Dopus4 and xadunfile command using it to extract an ADF to any Dir on the amiga. It works like a dream on 3.1.4 and 3.9. Today i tried it on OS 3.1 (on the same A1200 and using the same version of Dopus 4.16) and it fails. Dopus freezes almost instantly while it brings up a window. I can only reset to have a usable amiga again. The script is s protected and using the same arguments. ".KEY FILE If EXISTS "<FILE>" If EXISTS ENV:rnounadfd Set defdir $rnounadfd Else Set defdir "RAM:" EndIf C:RequestFile DRAWERSONLY TITLE "Select destination..." DRAWER="$defdir" > ENV:rnounadfd If NOT WARN CD $rnounadfd List "<FILE>" LFORMAT="%M" > ENV:rnounadff C:XADUnFile "<FILE>" "$rnounadff" DIMG Delete ENV:rnounadff >NIL: Else Delete ENV:rnounadfd >NIL: EndIf UnSet defdir EndIf" Any ideas why? Thanks |
07 September 2020, 12:27 | #18 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
DOpus4 freezes when started or the script freeze? For the first you might have an to old SetPatch version.
|
07 September 2020, 13:41 | #19 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
No dopus works fine with any commands and buttons I made but when I try to use the button assigned to that script then it freezes while trying to execute the script displaying the output window empty of course. I made this button using AmigaDos function and the command is “execute S:script name which is in S folder. The script is also S protected...
The same script with the same Dopus version on my two other systems 3.1.4 and 3.9 works fine. It doesn’t seem to be able to execute the script... either 3.1 needs me to do smg else or dopus is different under 3.1. Any clues???? |
07 September 2020, 17:18 | #20 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
Write a simple script, e.g. "echo 'some text'" and integrate it the same way like you did with the non working script. If it works you can investigate the xad stuff script. If not there is something else going on.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
External XAD LhA for 68k? | hexaae | support.Apps | 14 | 22 January 2023 09:17 |
DOpus 4.17pre20 DMS XAD/XFD ClassicWB | Octopus66 | support.Other | 3 | 05 May 2016 18:28 |
UnArchiving LHA Files Programmatically: Confused about XPK, XAD, XFD | tygre | Coders. C/C++ | 18 | 17 June 2015 00:26 |
Fixed XAD for lha (OS3.9) | ancalimon | request.Apps | 1 | 27 July 2014 17:39 |
RAR XAD - AmigaOS3 ? | ancalimon | request.Apps | 6 | 19 January 2012 13:53 |
|
|