Difference between revisions of "MSwindows"

From wiki
Jump to navigation Jump to search
(Created page with "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 se...")
 
m
Line 2: Line 2:
  
  
;set now=%date:~<start>,<len>%
+
;<nowiki>set now=%date:~<start>,<len>%</nowiki>
 
:Get a substring from date
 
:Get a substring from date
  

Revision as of 11:41, 9 February 2018

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>