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 assign a current day of the week to an environment variable



## In batch file, use double percent %% prefix for the loop variable

@for /f "tokens=1-2 delims= " %%a in ('Date /T') do set SomeVar=%%a
echo "%SomeVar%"


## on command prompt, use single percent % prefix for the loop variable

@for /f "tokens=1-2 delims= " %a in ('Date /T') do set SomeVar=%a
echo "%SomeVar%"






[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]