General discussion

Locked

diary create date name directory with ba

By asihuay ·
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

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

diary create date name directory with ba

by mike In reply to diary create date name di ...

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

Collapse -

diary create date name directory with ba

by asihuay In reply to diary create date name di ...

The question was auto-closed by TechRepublic

Collapse -

diary create date name directory with ba

by gutridgesj In reply to diary create date name di ...

looks like a good answer. why not rate it?

Collapse -

diary create date name directory with ba

by asihuay In reply to diary create date name di ...

The question was auto-closed by TechRepublic

Collapse -

diary create date name directory with ba

by asihuay In reply to diary create date name di ...

This question was auto closed due to inactivity

Back to Windows Forum
5 total posts (Page 1 of 1)  

Operating Systems Forums