How do I pass a variable to the 7za command as a parameter in Powershell?

Asked

Viewed 20 times

0

First of all I am using the 7za file compression system for command line, I am running Windows 10. At the following command:

$nomeArq ="Nome Aleatorio.zip"
7za a -tzip $nomeArq "Minhas coisas"

The execution of it went wrong unfortunately, then I tried to rename (I tried to use the power shell Rename-Item to rename and also the error) after the compression but also the error The point is: how to use power shell variables in commands? the command:

echo $nomeArq 

Works properly

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.