FG

Passing a powershell variable as output directory in 7zip

Fresh3 days ago
Mar 15, 20265743 views
Confidence Score0%
0%

Problem

I need to execute something like inside a powershell script, but substitute destination folder (C:\Destination) with a variable. Some like: which obviously does not work. The previous statement in fact creates a folder with actual name How can this be done?

Error Output

7za e $file_path -oC:\Destination

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Passing a powershell variable as output directory in 7zip

Low Risk

I think this should work, but it doesn't for me for some reason: This will work: This will also work (it's just condensing the previous one into one line):

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment