Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions


Posted on 2013-12-04
Last Modified: 2013-12-04

How do I create a daily folder with a naming convention like this 2012.09.11 as name in a particular folder - where 9 is the month and 11 is the day – in command shell and save it as batch script?

Question by:Rayne
  • 3
LVL 19

Accepted Solution

jss1199 earned 500 total points
ID: 39695974
Adding the below line in a script and running the script daily, maybe via task scheduler, will create a folder with the current date in the requested format. change C:\mydir\ to the location where you want the folder created.

md C:\mydir\%date:~-4,4%.%date:~-10,2%.%date:~-7,2%

Author Comment

ID: 39696033
Thank you a Million :)

Author Comment

ID: 39696044
Hello jss1199

How do i add it in task scheduler?

Author Comment

ID: 39696060
thank you Got it

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
My experience with Windows 10 over a one year period and suggestions for smooth operation
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question