Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

batch

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
Rayne
Asked:
Rayne
  • 3
1 Solution
 
jss1199Commented:
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
 
RayneAuthor Commented:
Thank you a Million :)
0
 
RayneAuthor Commented:
Hello jss1199

How do i add it in task scheduler?
0
 
RayneAuthor Commented:
:)
thank you Got it
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now