title: How to use for /f instead of if
body: <p>I dont know how right my for /f is. Please somebody help. I need to use the for /f instead of all the IF.</p>
  
  <p><code>for /f "eol=; tokens=1,2,3* delims," %%i in (January,February,March,April,May,June,July,August,September,October,November,December) do if day7=%%i &amp;&amp; set month12=%%j &amp;&amp;</code></p>
  
  <pre><code>set day365=%%k
  set day7=%DATE:~0,3%
  set month12=%DATE:~4,2% 
  set day365=%DATE:~7,2%
  set year1=%DATE:~10,4%
  
  if /i %day7%==Sun set day7=Sunday
  if /i %day7%==Mon set day7=Monday
  if /i %day7%==Tue set day7=Tuesday
  if /i %day7%==Wed set day7=Wednesday
  if /i %day7%==Thu set day7=Thursday
  if /i %day7%==Fri set day7=Friday
  if /i %day7%==Sat set day7=Saturday
  
  
  
  if /i %month12%==1 set month12=January
  if /i %month12%==2 set month12=February
  if /i %month12%==3 set month12=March
  if /i %month12%==4 set month12=April
  if /i %month12%==5 set month12=May
  if /i %month12%==6 set month12=June
  if /i %month12%==7 set month12=July
  if /i %month12%==8 set month12=August
  if /i %month12%==9 set month12=September
  if /i %month12%==10 set month12=October
  if /i %month12%==11 set month12=November
  if /i %month12%==12 set month12=December
  </code></pre>