Discussion Locked

diary create date name directory with ba

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

can anybody help me
I need create diary date name directory , I want an script batch file to do this.
1) create directory
ex: c:\archivo\20000130 for day 2000-jan-30
ex: c:\archivo\20000201 for day 2000-feb-01
ex: c:\archivo\20000211 for day 2000-feb-11
2)if exist this directory do not make any action.
3)if if not exist create the new date name directory and copy especific files to this new directory.
ex: copy F:\arch\basedato.xls C:\archivo\20000130 /v

5 replies

by mike

Boy I had to think about this for a few secs... this will give you a good start, the hard stuff is done and you can change it to suit you needs...

rem start
echo. |date|find /i "current" >cu##ent.bat

echo set date=%%4 >current.bat

call cu##ent.bat
cd %date%
if exist flag.idx goto quit
md %date% >nul
cd\%date%
dir >flag.idx

:quit
cd..
set date=
del cu??ent.bat >nul
rem del current.bat >nul
Rem end of batch....

What a teaser eh!!!!
Good Skill (not luck)
Mike

This discussion is closed to new replies.