Search found 2 matches

by malortje
17 Jul 2017 05:31
Forum: DOS Batch Forum
Topic: Check day and if day = .. start file
Replies: 6
Views: 7302

Re: Check day and if day = .. start file

You could simplify the entire process by just using the built-in WMIC.exe. For /F EOL^=D %%A In ('WMIC Path Win32_LocalTime Get DayOfWeek' ) Do If %%A Equ 1 Start "" "Your Program.exe" You just need to verify that Monday is allocated 1 in your local output, it is here despite it...
by malortje
14 Jul 2017 04:26
Forum: DOS Batch Forum
Topic: Check day and if day = .. start file
Replies: 6
Views: 7302

Check day and if day = .. start file

Hi Guys, I've found a nice peace of code for checking the day time here. @ECHO off set v_day_of_week= set v_day= set v_month= set v_year= SETLOCAL ENABLEEXTENSIONS for /f "tokens=1" %%t in ('date/t') do ( set v_day_of_week=%%t if "%%ta" LSS "a" (set toks=1-3) else (set ...