1.

Solve : Creating a folder with date, using .bat?

Answer»

I am looking for a line of CODE that will CREATE a folder using the date of creation, or system date. Currently, using the %date% adds "??/??/??" slashs and this not allowed. I am looking for a folder name like this "11182004". can someone please help me out?

Thanks in advancefirst of all you cannot have two folders with the same name in the same directory  so what you WANT to do will cause a PROBLEM(if you COULD do it) and you created two folders with the  same date

why not just use underscores
is it this simple what you ask?

md   11_30_04

I think you are trying to automatically create a filename based on current date.

copy c:\database\file.dbs "f:\backup\%date:~4,2%%date:~7,2%%date:~-2,2%.dbs"

See if that will work, just change the soource and destination directories and drives to suit your system.



Discussion

No Comment Found