Answer the question
In order to leave comments, you need to log in
How to correctly put the "-" character in front of a variable in bat?
The code:
set f6=42 3t
robocopy -%f6% "R:\%f6%"
robocopy "E:\folder\-%f6%" "R:\%f6%"
Answer the question
In order to leave comments, you need to log in
Found a way out
Before the dash "-" it was necessary to put ".\"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question