formatting dir as date
jam13
![]()
- Joined: Nov 14, 2011
- Posts: 6
I need to create a folder each day based on the datetime and am creating a folder using this as its name
%CurrentDateTime.Year%%CurrentDateTime.Month%%CurrentDateTime.Day%
e.g
mydir/20111128
mydir/20111129
BUT when I get to start of month I now get
mydir/20111121
I need
mydir/201111201
is it possible to do this ?
ChrisK
![]()
- Joined: Dec 30, 2010
- Posts: 95
You should have something more a long the lines of this:
1. Get Current Date and Time - saves to %CurrentDateTime%
2. Convert DateTime to Text - make sure to choose custom in the "Format to Use" and then in Custom Format put in: yyyyMMdd
3. Create Folder %FormattedDateTime% into C:\mydir
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2326
You can also check out the following blog post: http://www.winautomation.com/blog/clean-your-active-desktop-all-your-files-and-folders-daily-basis-creating-archive where the same logic is being used. :) Samantha
jam13
![]()
- Joined: Nov 14, 2011
- Posts: 6
chairs works
Login to post a reply Not a member yet? Register