I am a windows batch dunce.
I have a variable storing some text surrounded by hard brackets like:
[glcikLhvxq1BwPBZN0EGMQ==]
But I need to pass it as an argument like:
glcikLhvxq1BwPBZN0EGMQ==
How can I strip these hard brackets from the beginning and end in my windows batch file?
You can use the sub-string syntax:
which will remove the first and last characters. The sub-string starts here at the second character (so 1, zero-based) and extends until the second-to-last character (
-1).This is detailed more thoroughly in
help set.