batch file - Left-string, variable matching in a DOS command? -
batch file - Left-string, variable matching in a DOS command? -
is possible string pattern match in dos? instance want following:
if "%username" == "abc*" (echo 1)
i know asterisk doesn't work here , can't find alternative. have ideas?
try
if "%username:~0,3%" == "abc" (echo 1)
this substring %username
3 characters beginning
good luck
string batch-file pattern-matching dos
Comments
Post a Comment