How to unzip

Anything QL Software or Programming Related.
Post Reply
retro_collector
Brittle Membrane
Posts: 107
Joined: Sun Jul 21, 2019 2:26 pm
Location: Chicago, IL USA

How to unzip

Post by retro_collector »

I have the Q-Emulator version of Unzip, I have a zip file q.zip, I have q.zip in the same directory as unzip and have attached to MDV1_,

So I do EW MDV1_unzip;'-x q'. and no matter what I do UNZIP says Not found.

Any ideas?

Thanks

Bill
Screen Shot 2019-09-04 at 10.23.16 AM.png


User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: How to unzip

Post by Andrew »

-x does not extracts files from archive - it eXcludes files from extracting

Use: EX mdv1_unzip to see the help screen

To extract:
DATA_USE win2_ : REM set the device/directory to extract to
EX mdv1_unzip -d; "mdv1_q_zip" : REM extract to the data directory


Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: How to unzip

Post by Derek_Stewart »

Andrew wrote:-x does not extracts files from archive - it eXcludes files from extracting

Use: EX mdv1_unzip to see the help screen

To extract:
DATA_USE win2_ : REM set the device/directory to extract to
EX mdv1_unzip -d; "mdv1_q_zip" : REM extract to the data directory
Hi,

Infounzip does not have a -d option.

The command string which is the zip filename and any commad switches, should come after the the unzip executable, with a semi-comma delimiter.

Your example should be:

EX mdv1_unzip;"mdv1_q_zip"

Also the output of the unzip prgramme can be sent to a specific channel, by inserting a valid channel number after the executable file name, for example:

EX mdv1_unzip,#1;"mdv1_q_zip"

Will sent the unzip output to channel #1

Also if you want to see the unzip help file do:

EX mdv1_unzip,#1

or open a channel to a file and spool the help file to the file. Close file channel and you have the help screen as a file.

If you use the -x option, it can take a list of zip files.


Regards,

Derek
retro_collector
Brittle Membrane
Posts: 107
Joined: Sun Jul 21, 2019 2:26 pm
Location: Chicago, IL USA

Re: How to unzip

Post by retro_collector »

Thanks Derek!

That worked!


Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: How to unzip

Post by Derek_Stewart »

Hi,

I made a slight error in my previous post.

The -d option allows definition of the extract device.

So to extract a zip file to ram1_ using QL SCReen channel as the console output would be:

EX mdv1_unzip,#1;"-dram1_ mdv1_q_zip"

There does not require a space in the command option for -d but it seems the -dram1_ and -d ram1_ are the same. Just a matter of taste I suppose.

This is how ACP (Archive Control Panel) works, it defines the extract directory by selecting it in the ACP extract window and passes the directory with the -d option.

ACP requires the Extended Environment to be installed, I have this working with:

PTR_GEN v1.71
WMAN v1.53
HOT_REXT v2.28
QPAC2 v1.39

I have FIleinfo2 installed on Q-Emulator, which allows execution of the ZIP file and loads up ACP to examine or extract the ZIP file.


Regards,

Derek
Post Reply