# Where is the zip commands

**URL:** https://resource.dopus.com/t/where-is-the-zip-commands/43456
**Category:** Help & Support
**Tags:** jscript
**Created:** [January 19, 2023, 11:24pm UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456 "2023-01-19T23:24:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![JoeBeans](https://resource.dopus.com/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@JoeBeans](https://resource.dopus.com/u/JoeBeans)
#### Post date: [January 19, 2023, 11:24pm UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456/1 "2023-01-19T23:24:37Z")

</div>

There isn't a hyperlink for zip where it says "ZIP And Email Files" [https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Commands/File\_Commands.htm](https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Commands/File_Commands.htm)

In java script I want to be able to unzip archives of type .zip and .rar contents to a specific folder then be able to work with those contents. Some of these will have a password.

This page shows lots of examples of using archives but not how to extract it. [https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Internal\_Command\_Arguments.htm](https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Internal_Command_Arguments.htm)

I'm hoping the documentation will show how to pass a password. If I can't programmatically provide a password then I will have to come back later with questions about launching third-party programs with args.

Leo said opus can't store a password list, but I am not sure if that means that I can't use a password as an argument. [Opening passworded archives with password list?](https://resource.dopus.com/t/opening-passworded-archives-with-password-list/43374)

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [January 20, 2023, 2:54am UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456/2 "2023-01-20T02:54:07Z")

</div>

The [Copy command](https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Copy.htm) can be used to extract archives. For example, `Copy HERE EXTRACT=sub` would extract archives into folders below the current folder.

There's no way to give it a password, though.

You can run external commands via the same Command object you use to run Opus commands. (The Windows scripting objects also provide other ways to run commands, but are probably not important for this particular case.)

---

<div class="post-metadata">

### Author: ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)
#### Post date: [January 20, 2023, 2:04pm UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456/3 "2023-01-20T14:04:28Z")

</div>

> [@JoeBeans](#):
>
> how to pass a password

You can send passwords to both 7zip and WinRAR via their command lines. Both work well with Opus.

---

<div class="post-metadata">

### Author: ![JoeBeans](https://resource.dopus.com/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@JoeBeans](https://resource.dopus.com/u/JoeBeans)
#### Post date: [January 20, 2023, 6:35pm UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456/4 "2023-01-20T18:35:28Z")

</div>

> [@lxp](#):
>
> You can send passwords to both 7zip and WinRAR via their command lines. Both work well with Opus.

I assume there is no way to get feed back of when the unzipping process is done by the third party program?

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [January 20, 2023, 6:44pm UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456/5 "2023-01-20T18:44:15Z")

</div>

Depending on how you run the command, and what the other program does, the script will usually wait for it to finish.

---

<div class="post-metadata">

### Author: ![JoeBeans](https://resource.dopus.com/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@JoeBeans](https://resource.dopus.com/u/JoeBeans)
#### Post date: [January 20, 2023, 6:52pm UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456/6 "2023-01-20T18:52:48Z")

</div>

> [@Leo](#):
>
> Depending on how you run the command, and what the other program does, the script will usually wait for it to finish

Okay, I will try that in the short term.

I found this:  
" For external commands it only indicates whether or not Opus launched the command. If you need the exit code of an external command, use the WScript.Shell Run or Exec methods to run the command.) You can use the **Results** property to find out more information about the results of the command, and also discover which files (if any) failed using the **failed** property of each [**Item**](https://www.gpsoft.com.au/help/opus12/Documents/Scripting/Item.htm) in the **files** collection."

I assume if I can figure out what all this means, then it will be safer to do it this way to makes sure that the program gives the correct exit code.

Edit: is wscript.shell on for vb? I am using jscript.

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [January 20, 2023, 8:09pm UTC](https://resource.dopus.com/t/where-is-the-zip-commands/43456/7 "2023-01-20T20:09:46Z")

</div>

> [@JoeBeans](#):
>
> Edit: is wscript.shell on for vb? I am using jscript.

Everything works with both.
