Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Windows >> Command Line >> How to manipulate variables in a batch file

(1) Adding a number or incrementing a variable set var1=1 set var2=1 set /a sum1=%var1%+%var2% echo %sum1% (2) extract a length of substring from an offset and set var=one.twothree set /a var2 = %var:~4.3% echo %var2% will yield "two" (3 characters from offset 4 i.e. 5th character) set var=one.twothree set /a var2 = %var:~4% echo %var2% will yield "twothree" (substring after offset 4 i.e. 5th character onwards)
[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]