I am making a text to binary encoder with a batch code. In order to do that, I need to know how to store just a space inside a variable. The code below is an example of how it may be.
@echo off set test=I am set char2=%test:~1,1%
This code supposedly stores the second character of %test% (which is space) in %char2%. However, when I echo char2 to verify that this worked, I only get "ECHO is ON" and the variable is not treated as having any input. I hope anyone could help. Thank you!