Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1868

How to sanitize my input string

$
0
0
I've tried a few things including backticks and "double quotes" and the %@unquotes[...] function, but none of them are doing what I want.

Basically, I want to sanitize what the INPUT command puts into a variable, so that if the input contains (say) an ampersand, the ampersand is not interpreted when the variable is echoed back to the console.

Code:
[ 3:24] > type test1.btm
@echo off
echo Enter a line of input with an ampersand in it:
input /L75 `>>> ` %%myline
echo #...

Read more

Viewing all articles
Browse latest Browse all 1868

Trending Articles