Batch file Command need for NewFlodercreation

April 7, 2010 at 01:16:22
Specs: Windows XP
hi

i need to create one folder with current date name.i have to create with help of batch file


See More: Batch file Command need for NewFlodercreation

Report •

#1
April 7, 2010 at 03:51:10
@echo off > d.d

>> d.d echo E 0100 B4 2A CD 21 B4 4C CD 21
>> d.d echo N DAY.COM
>> d.d echo RCX
>> d.d echo 8
>> d.d echo W
>> d.d echo E 0100 B4 2A CD 21 88 F0 B4 4C CD 21
>> d.d echo N MONTH.COM
>> d.d echo RCX
>> d.d echo A
>> d.d echo W
>> d.d echo E 0100 B4 2A CD 21 89 C8 B4 4C CD 21
>> d.d echo N YEAR.COM
>> d.d echo RCX
>> d.d echo A
>> d.d echo W
>> d.d echo E 0100 B4 2A CD 21 88 D0 B4 4C CD 21
>> d.d echo N DAT.COM
>> d.d echo RCX
>> d.d echo A
>> d.d echo W
>> d.d echo Q

debug < d.d > nul
del d.d

dat
for %%a in (1 2 3 4 5 6 7 8 9                                                                  ) do if errorlevel %%a set DD=0%%a
for %%a in (                  10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31) do if errorlevel %%a set DD=%%a

day
if errorlevel 0 set day=Sunday
if errorlevel 1 set day=Monday
if errorlevel 2 set day=Tuesday
if errorlevel 3 set day=Wednesday
if errorlevel 4 set day=Thursday
if errorlevel 5 set day=Friday
if errorlevel 6 set day=Saturday

month
for %%a in (1 2 3 4 5 6 7 8 9         ) do if errorlevel %%a set MM=0%%a
for %%a in (                  10 11 12) do if errorlevel %%a set MM=%%a

year
if errorlevel 215 set YYYY=2007
if errorlevel 216 set YYYY=2008
if errorlevel 217 set YYYY=2009
if errorlevel 218 set YYYY=2010
if errorlevel 219 set YYYY=2011
if errorlevel 220 set YYYY=2012

set   YYYYMMDD=%YYYY%%MM%%DD%

del day.com
del month.com
del year.com
del dat.com

md %YYYY%%MM%%DD%
set YYYY=
set MM=
set DD=
set day=


=====================================
Helping others achieve escape felicity

M2


Report •

#2
April 10, 2010 at 02:09:26
Thank you Now this is working .i have one more doubt that is , i have to move data from old folder to newly created folder.i tried with Move command but i am not able to define newly created folder name.how can move this? please help me

Report •

#3
April 10, 2010 at 02:38:27
Put your MOVE immediately after this line:

md %YYYY%%MM%%DD%
=============================
Like this:

md %YYYY%%MM%%DD%
move c:\files\*.* %YYYY%%MM%%DD%


=====================================
Helping others achieve escape felicity

M2


Report •

Related Solutions

#4
April 10, 2010 at 03:41:28
Thank you for your Nice Input

it's working fine


Report •

Ask Question