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

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

r - url in CRAN extension manual -

asp.net - .NET Control.ID property inconsistency -