Created
August 26, 2018 23:33
-
-
Save lkishfy/c4bafa688522b1e508bf79f70c4b39c9 to your computer and use it in GitHub Desktop.
Node Startup Script that changes CD based on time of year
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set summer=false | |
| for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a | |
| set year=%dt:~0,4% | |
| set month=%dt:~4,2% | |
| set day=%dt:~6,2% | |
| if %month%==01 set monthname=January | |
| if %month%==02 set monthname=Febuary | |
| if %month%==03 set monthname=March | |
| if %month%==04 set monthname=April | |
| if %month%==05 set monthname=May | |
| if %month%==06 set monthname=June | |
| if %month%==07 set monthname=July | |
| if %month%==08 set monthname=August | |
| if %month%==09 set monthname=September | |
| if %month%==10 set monthname=October | |
| if %month%==11 set monthname=November | |
| if %month%==12 set monthname=December | |
| echo %monthname% | |
| if %month%==01 set summer=false | |
| if %month%==02 set summer=false | |
| if %month%==03 set summer=true | |
| if %month%==04 set summer=true | |
| if %month%==05 set summer=true | |
| if %month%==06 set summer=true | |
| if %month%==07 set summer=true | |
| if %month%==08 set summer=true | |
| if %month%==09 set summer=true | |
| if %month%==10 set summer=false | |
| if %month%==11 set summer=false | |
| if %month%==12 set summer=false | |
| echo The Summer variable is: %summer%. | |
| if %summer% == false ( | |
| title app_name | |
| cd C:\path | |
| :startux | |
| echo Launching Exhibit... | |
| npm start run | |
| goto startux | |
| ) | |
| if %summer% == true ( | |
| title app_name | |
| cd C:\path | |
| :startux | |
| echo Launching Exhibit... | |
| npm start run | |
| goto startux | |
| ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment