Solved Batch to create new folder every month

November 25, 2011 at 08:51:23
Specs: Windows 7, 8 GB
Every first day of the month,we need to create folder for example:11 Novembar
where 11:Number of month,November name of the month:
Is there way to create variable to automatically change folder name accordingly every first of the month:

12 December
01 January
and so on:


See More: Batch to create new folder every month

Report •

November 25, 2011 at 14:54:45
✔ Best Answer
If you ran this script with a scheduled task at the beginning of every month, it would create the folder you want on the c drive. If you run it right now, it will create a folder named c:\11_November

@echo off


set v=%date:~4,2%
set month_num=%date:~4,2%
set month_text=01-January;02-February;03-March;04-April;05-May;06-June;07-July;08-August;09-September;10-October;11-November;12-December

call set v=%%month_text:*%v%-=%%
set v=%v:;=&rem.%

mkdir c:\%month_num%_%v%


Report •
Related Solutions

Ask Question