Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello, I want to regularly start a batchfile, that copies the same file every day and automatically changes the filename to the current date.
For example
Event.txt --> event020719
Event.txt --> event020720
Event.txt --> event020721Does anyone know how to do that?
Thanks in advance
Simone

I forgot to say that I am not using Win98, but Win2000. The mentioned batchfile won't work on Win2000.
How do I have to change it, so it works on Win2000?
Simone

Did you follow all the links in the post?
Did you read response 3 here?
http://www.computing.net/dos/wwwboard/forum/10290.html

very cool, that was exactly what I was looking for. I love when I come across a post that is what I need.

I love when someone reads previous posts before posting a question answered a day ago.
BTW, there's another method, which I prefer (at the time I posted those replys on RMan's links, I didn't know about this method). This is all one line:
FOR /F "tokens=2,3,4 delims=/- " %a in ("%DATE%") do set CDATE=%a%b%c
If on a batch file, double the %'s from %a %b and %c (%%a %%b %%c).
It's longer, but more simple to read.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |