MSwindows

From wiki
Revision as of 11:41, 9 February 2018 by Hdridder (talk | contribs)
Jump to navigation Jump to search

If you are forced to use MSwindows this may help


set now=%date:~<start>,<len>%
Get a substring from date
for /F %%i in (<filename>) do set var1=%%i
Read filename and set var1 to the content of the file
if %var1% == %var2% command
Execute command if var2 is equal to var1. if /I ignores case
if EXIST file1 ( commandblock )
Execute the commandblock if file1 exists
if ERRORLEVEL <num> ( command )
Commands return ERRORLEVEL as exist status. Execute command if the ERRORLEVEL matches <num>