0

I am writing simple batch file as post-build action in Visual Studio and I cannot get rid of quotes which are added when I am combining two variables. The code looks like this:

set SolutionDir=%1
set ConfigurationName=%2

set AltSourceDir=%SolutionDir%\%ConfigurationName%

echo "%AltSourceDir%"

In the point of merge I get quotation marks:

""D:\WORK\Extractor\"\"Release""

How to merge them directly?

2
  • How do you provide the parameters when you call the batch file? Commented Feb 1, 2016 at 11:08
  • @a_horse_with_no_name, as "$(SolutionDir)" "$(ConfigurationName)" -- this part is intended, otherwise I would get splits on whitespaces (if present). Commented Feb 1, 2016 at 11:22

1 Answer 1

3

%~1 removes quotes. See call /?.

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.