'Combine two variables/paths in bat script

I am trying to combine zip all the contents of a folder. Following is in my bat file:

set DESIGN="%1"
set new_var="%2"
powershell Compress-Archive -Path %DESIGN%\* -DestinationPath %DESIGN%\%new_var%.zip

Below is how I am calling it:

zip_power.bat C:\rehost res_h

Below is the cmd output:

what I see

It is adding additional quotes. How do I concatenate two paths?



Solution 1:[1]

You are adding the " marks when you are setting the variables... so they are included when you inject them into the later statement.

try

set DESIGN=%1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nigel Thorne