make a folder with the current date as the name with a batch file

  • Thread starter Thread starter Neal
  • Start date Start date
N

Neal

Hi there.

I want to schedule a batch file to backup some data.

Each day, I'd like it to run and make a new folder with the current date as
the folder name. How can I do that?

I just want to type up a batch file called copy.bat and have the scheduler
run it.

Thanks, Neal
 
Have a look at the item "Date in file name", posted in this group
only three days ago.
 
This is asked about 200 times a month. Try looking through this group or
cmdprompt.admin for suggestions. But here's an example of echoing the date
in YYYY-MM-DD format at the command prompt.

for /f "tokens=2-4 delims=/ " %a in ('date /t') do (echo %c-%a-%b)

Ray at home
 
Back
Top