Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Script: Tell me what I'm doing wrong
New Posts  All Forums:Forum Nav:

Script: Tell me what I'm doing wrong

post #1 of 2
Thread Starter 
Code:
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
  set dow=%%i
  set month=%%j
  set day=%%k
  set year=%%l
)
IF %%j EQU 07 set month=Jul

echo %month%_%year%_KC245
I'm trying to check the month variable and change it to "Jul" if it shows "07"

Am I even on the right track?
    
CPUMotherboardGraphicsRAM
AMD 64 3500+ Asus A8N SLI Delux 128 MB 1024 MB 
Hard DriveOSMonitorKeyboard
Almost a TB XP Pro Some cheap Flat Panel Wireless Microsoft 
PowerCaseMouseMouse Pad
600 watt embarassing Wireless Microsoft Laser Stooges Baby!! 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD 64 3500+ Asus A8N SLI Delux 128 MB 1024 MB 
Hard DriveOSMonitorKeyboard
Almost a TB XP Pro Some cheap Flat Panel Wireless Microsoft 
PowerCaseMouseMouse Pad
600 watt embarassing Wireless Microsoft Laser Stooges Baby!! 
  hide details  
Reply
post #2 of 2
Thread Starter 
GOT IT!!!! WOOT!!!

IF %month% == 07 set month=Jul

Code:
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
  set dow=%%i
  set month=%%j
  set day=%%k
  set year=%%l
)
IF %month% == 01 set month=Jan
IF %month% == 02 set month=Feb
IF %month% == 03 set month=Mar
IF %month% == 04 set month=Apr
IF %month% == 05 set month=May
IF %month% == 06 set month=Jun
IF %month% == 07 set month=Jul
IF %month% == 08 set month=Aug
IF %month% == 09 set month=Sep
IF %month% == 10 set month=Oct
IF %month% == 11 set month=Nov
IF %month% == 12 set month=Dec

echo %month%_%year%_KC245
    
CPUMotherboardGraphicsRAM
AMD 64 3500+ Asus A8N SLI Delux 128 MB 1024 MB 
Hard DriveOSMonitorKeyboard
Almost a TB XP Pro Some cheap Flat Panel Wireless Microsoft 
PowerCaseMouseMouse Pad
600 watt embarassing Wireless Microsoft Laser Stooges Baby!! 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD 64 3500+ Asus A8N SLI Delux 128 MB 1024 MB 
Hard DriveOSMonitorKeyboard
Almost a TB XP Pro Some cheap Flat Panel Wireless Microsoft 
PowerCaseMouseMouse Pad
600 watt embarassing Wireless Microsoft Laser Stooges Baby!! 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Script: Tell me what I'm doing wrong