SHARE
TWEET

Untitled

a guest Jun 24th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
  2. set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
  3. set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
  4.  
  5.  
  6. set "month=%MM%"
  7.  
  8.  
  9. setlocal EnableDelayedExpansion
  10.  
  11.  
  12. IF "%month%"=="01" (
  13. set "FolderName=1_Jan"
  14. ) ELSE IF "%month%"=="02" (
  15. set "FolderName=2_Feb"
  16. ) ELSE IF "%month%==03" (
  17. set "FolderName=3_Mar"
  18. )  ELSE IF "%month%"=="04" (
  19. set "FolderName=4_Apr"
  20. )  ELSE IF "%month%"=="05" (
  21. set "FolderName=5_May"
  22. )  ELSE IF "%month%"=="06" (
  23. set "FolderName=6_Jun"
  24. )  ELSE IF "%month%"=="07" (
  25. set "FolderName=7_Jul"
  26. )  ELSE IF "%month%"=="08" (
  27. set "FolderName=8_Aug"
  28. )  ELSE IF "%month%"=="09" (
  29. set "FolderName=9_Sep"
  30. )  ELSE IF "%month%"=="10" (
  31. set "FolderName=10_Oct"
  32. )  ELSE IF "%month%"=="11" (
  33. set "FolderName=11_Nov"
  34. )  ELSE IF "%month%"=="12" (
  35.   set "FolderName=12_Dec"
  36. )
  37. echo "Month is %month%"
  38. echo "FolderName value - %FolderName%"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top