Tuesday 29 July 2014

How to create Folder with current date name in Windows?

Hi Everyone,

This is not the middleware command I just want to maintain a note for my own. Using this command I am creating folder of a current Date_name and in which again creating folder of current Time_name. 

@echo off
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a-%%b)

set mydir="%mydate%"
set subdir="%mytime%"
mkdir %mydir%
cd %mydir%
mkdir %subdir%
cd ..


Effort only fully releases its reward after a person refuses to quit.”
Regards,
Akhilesh B. Humbe
 

No comments:

Post a Comment

Popular Posts