1. #1
    jcgriff2's Avatar
    Join Date
    Feb 2012
    Location
    New Jersey Shore
    Posts
    16,326
    • specs System Specs
      • Manufacturer:
        HP
      • Model Number:
        HP ENVY TouchSmart 17-j130us Notebook - E8A04UA
      • Motherboard:
        HP Insyde 720265-501 6050A2549501-MB-A02
      • CPU:
        Intel Core i7-4700MQ Processor with Turbo Boost up to 3.4GHz.
      • Memory:
        12GB DDR3L SDRAM (2 DIMM)
      • Graphics:
        Intel HD graphics 4600 with up to 1792MB total graphics memory
      • Sound Card:
        Beats Audio quad speakers and two subwoofers
      • Hard Drives:
        1TB 5400RPM hard drive with HP ProtectSmart Hard Drive Protection
      • Disk Drives:
        Hitachi 500 GB SSD; 7 TB USB External
      • Power Supply:
        90w
      • Case:
        Laptop
      • Display:
        17.3-inch diagonal HD+ BrightView LED-backlit touchscreen display (1600 x 900)
      • Operating System:
        Windows 8.1

    WMI batch script to obtain literal and numeric day of week

    A simple WMI batch script to obtain literal and numeric day of week -

    Code:
    
    @echo off  
    set daysofweek=Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday  
    for /F "skip=2 tokens=2-4 delims=," %%A in ('WMIC Path Win32_LocalTime Get DayOfWeek /Format:csv') do set daynumber=%%A  
    for /F "tokens=%daynumber% delims=," %%B in ("%daysofweek%") do set day=%%B
    echo %daynumber% > c:\0  & echo %day% >> c:\0 & start notepad c:\0
    
    
    A Notepad will open with the day #; next line = Day of the week.

    Batch file - http://sysnative.com/0x8/wmi_dayofweek_nameofday_jcgriff2_.bat.zip


    http://www.techsupportforum.com/foru...ml#post3217395

    Thanks. . .

    John

    BSOD Posting Instructions - Windows 10, 8.1, 8, 7 & Vista ` ` `Carrona Driver Reference Table (DRT)
    https://www.sysnative.com/
    Sysnative Hex-Decimal-UNIX Date Conversion

    Has Sysnative Forums helped you?
    Please consider donating to help support the forum.
    Thank You!

    Microsoft MVP 2009-2015
    Windows Insider MVP 2018 - Present


    • Ad Bot

      advertising
      Beep.

        
       

  2. #2
    AceInfinity's Avatar
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,725

    Re: WMI batch script to obtain literal and numeric day of week

    Looks good :)
    jcgriff2 says thanks for this.
    Automation Programmer
    Microsoft MVP [2012 - 2018]

Similar Threads

  1. A Simple Batch Script Explained
    By jcgriff2 in forum Programming
    Replies: 5
    Last Post: 03-18-2013, 07:08 AM
  2. Replies: 0
    Last Post: 11-12-2012, 07:59 PM
  3. Pass Generator Batch script - Created by Ace
    By AceInfinity in forum Programming
    Replies: 0
    Last Post: 10-01-2012, 01:24 AM
  4. WMI Battery Status - Batch file
    By jcgriff2 in forum Windows 8 | Windows RT Tutorials
    Replies: 0
    Last Post: 09-15-2012, 10:50 PM

Log in

Log in