Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- COLOR 1B
- TITLE TIME & DATE FOLDER BY (c) NAJEEB (c) 2021
- :Time
- ::
- :: Get the TIME details
- ::
- Set "WT=%Time%"
- Set time.HH=%WT:~0,2%
- Set time.MM=%WT:~3,2%
- Set time.SS=%WT:~6,2%
- ::==========================================================================
- ==::
- Set time.AMPM=PM
- If /I %time.HH% LSS 10 (
- Set time.HH=0%time.HH:~1,1%
- )
- If /I %time.HH% LSS 12 (
- Set time.AMPM=AM
- Set time.HH12=%time.HH%
- ) Else (
- Set /a time.HH12=%time.HH%-12
- )
- If /I %time.MM% LSS 10 (
- Set time.MM=%time.MM:~1,1%
- )
- If /I %time.SS% LSS 10 (
- Set time.SS=%time.SS:~1,1%
- )
- If /I %time.HH12% lss 10 (
- Set time.HH12=%time.HH12%
- )
- Set time.HHMMSS=%time.HH%%time.MM%%time.SS%
- Set time.HHMMSS2=%time.HH12%%time.MM%%time.SS%%time.AMPM%
- Set time.USA=%time.HH%.%time.MM%.%time.SS%
- Set time.USA2=%time.HH12%.%time.MM%.%time.SS% %time.AMPM%
- :Month
- 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%
- set sec=%dt:~12,6%
- set hh=%dt:~8,2%
- set min=%dt:~10,2%
- if %month% == 01 set monthname=Jan
- if %month% == 02 set monthname=Feb
- if %month% == 03 set monthname=Mar
- if %month% == 04 set monthname=Apr
- if %month% == 05 set monthname=May
- if %month% == 06 set monthname=Jun
- if %month% == 07 set monthname=Jul
- if %month% == 08 set monthname=Aug
- if %month% == 09 set monthname=Sep
- if %month% == 10 set monthname=Oct
- if %month% == 11 set monthname=Nov
- if %month% == 12 set monthname=Dec
- :Day
- set dy=%DATE:~0,3%
- IF %dy% == Mon set dayofweek=Monday
- IF %dy% == Tue set dayofweek=Tuesday
- IF %dy% == Wed set dayofweek=Wednesday
- IF %dy% == Thu set dayofweek=Thursday
- IF %dy% == Fri set dayofweek=Friday
- IF %dy% == Sat set dayofweek=Saturday
- IF %dy% == Sun set dayofweek=Sunday
- set mydir="%dayofweek% %day%-%monthname%-%year% %time.HH12%.%time.MM%.
- %time.SS% %time.AMPM%"
- mkdir %mydir%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement