Resolved: Use to extract a file with 7z


Trying to do a little script to automate some tasks. Chose deno as a nice self-contained way to do random automation tasks I need – and a learning opportunity.
One of the things I’m trying to do is extract an archive using 7z and I can’t figure out why it’s not working.
let cmdProcess ={
    cmd: ["7z", "e"],
    stdout: "piped",
    stderr: "piped"
const output = await cmdProcess.output()
const outStr = new TextDecoder().decode(output);

const errout = await cmdProcess.stderrOutput()
const errStr = new TextDecoder().decode(errout);
7z does run, according to the normal output. But I receive the following error no matter what parameters I try to pass to 7z:
Command Line Error:
Unsupported command:
It doesn’t matter if I supply the full path or relative, or what command I give.
It’s possible that I’m supplying the wrong arguments to, but I’ve been unable to google because most search result end up being for the deno run CLI command.
I am on Win 10 21H2.
deno v1.19.3


It should work if you split the e subcommand from the argument
const cmdProcess ={
  cmd: ["7z", "e", ""],
  stdout: "piped",
  stderr: "piped",
With you need to split all the different subcommands/options/flags of a command into separate strings in the cmd array, as is mentioned in this thread
For documentation on the Deno namespace API you can find it at For specifically you can find it here.

If you have better answer, please add a comment about this, thank you!