A
A
Artem Kaybagorov2017-05-10 06:36:31
cmd/bat
Artem Kaybagorov, 2017-05-10 06:36:31

How to use a system variable containing %1 in the name in *.bat file?

You need to call a system variable with the name %1c_filial% in the script, but in batch files with the command %1, %2, etc. cause the n-th argument, how to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2017-05-10
@ArteMoon

Turn on
setlocal enabledelayedexpansion
and then use the desired variable like this:
echo.!1c_filial!
But it's better to immediately re-save it into a more digestible variable:
set "filial_1c=!1c_filial!"
and then use filial_1c

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question