Solved

batch

Posted on 2013-12-04
4
196 Views
Last Modified: 2013-12-04
Hello,

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?

Thanks
0
Comment
Question by:Rayne
  • 3
4 Comments
 
LVL 19

Accepted Solution

by:
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%
0
 

Author Comment

by:Rayne
ID: 39696033
Thank you a Million :)
0
 

Author Comment

by:Rayne
ID: 39696044
Hello jss1199

How do i add it in task scheduler?
0
 

Author Comment

by:Rayne
ID: 39696060
:)
thank you Got it
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A brief introduction to what I consider to be the best editor for PowerShell.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now