0

I'm not familiar with windows batch script. So, please help me. I want to concat two path using batch file.

I tried :

set mypath=%cd% 
@echo %mypath%

unzip -o %mypath%+"\\xpi\\test.xpi" -d %mypath%+"\\Debug\\" 

But, not working.

So, how to concat two path?

1
  • There is no need for an interim variable %mypath%, just use %CD% immediately... Commented Mar 27, 2018 at 9:58

1 Answer 1

1

You could perhaps try this:

Set "MyPath=%CD%" 
@Echo=%MyPath%

unzip -o "%MyPath:\=\\%\\xpi\\test.xpi" -d "%MyPath:\=\\%\\Debug\\"

If the double backslashes aren't a requirement under Windows then maybe this is all you need:

Set "MyPath=%CD%" 
@Echo=%MyPath%

unzip -o "%MyPath%\xpi\test.xpi" -d "%MyPath%\Debug\"

In both cases, unzip would have to be in %path% or local to the batch file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.