Question How to create new folders and rename faster?

smalltech

Distinguished
Apr 10, 2009
613
4
18,995
Hello,

I want to keep on creating new folders with first number increasing and date increasing forever everyday like this View: https://i.imgur.com/gnvLIpM.png


[1 140125] meaning folder number 1, date is 14 (meaning 14th of that month), month is 01 (meaning Jan), year is 25 (meaning 2025)

Q1. How can I continue to create it in a faster way? (currently I create a new folder and type in the number and date)

Q2. How to create a new folder named [misc] inside every folder in a fast way? (currently I open every folder then manually create a new folder and type in the name [misc])

Thanks

(I manually create the 28 folders seen above, I am looking for a faster way to create new folders with the same naming convention).
 
I would write a small Excel macro.
Column A with the sequential number and column to date. Then extend the rows as many as I need. I don't know your rules about holidays, if you have any.
Then comes the macro part that will create the directories.

Here it is. Note: It does not check whether the folder exists.

Sub Macro1()
'
' Macro1 Macro
'

Dim path As String
Dim wsheet As Worksheet

path = ThisWorkbook.path

Row = 2
Set wsheet = ActiveSheet

While wsheet.Cells(Row, 1) <> ""
D = wsheet.Cells(Row, 2)
temp2 = Format((Year(D) - 2000), "00")
temp = Format(Day(D), "00") & Format(Month(D), "00") & temp2

MkDir path & "\" & wsheet.Cells(Row, 1) & " " & temp

Row = Row + 1
Wend


End Sub
 
Looks and smells like a class project. This is something easily handled by PowerShell. What have you done so far?
I have written in my first post. The screenshot is what I have done. I have also described that I manually create a new folder and name it like my screenshot in my first post. Not a project. Just to store info according to a folder that has numbering and date.

"This is something easily handled by PowerShell." > Why not just share the solution here since it is an easy task for you?
 
I would write a small Excel macro.
Column A with the sequential number and column to date. Then extend the rows as many as I need. I don't know your rules about holidays, if you have any.
Then comes the macro part that will create the directories.

Here it is. Note: It does not check whether the folder exists.

Sub Macro1()
'
' Macro1 Macro
'

Dim path As String
Dim wsheet As Worksheet

path = ThisWorkbook.path

Row = 2
Set wsheet = ActiveSheet

While wsheet.Cells(Row, 1) <> ""
D = wsheet.Cells(Row, 2)
temp2 = Format((Year(D) - 2000), "00")
temp = Format(Day(D), "00") & Format(Month(D), "00") & temp2

MkDir path & "\" & wsheet.Cells(Row, 1) & " " & temp

Row = Row + 1
Wend


End Sub
The screenshot are folders in windows 10 pro. How does Excel create new folders inside windows, please explain how to use what you have written?

I mean I want to continue to create new folder and name them e.g.:

29 110225
30 120225
31 130225
.
.
.
 
Last edited:
I have written in my first post. The screenshot is what I have done. I have also described that I manually create a new folder and name it like my screenshot in my first post. Not a project. Just to store info according to a folder that has numbering and date.

"This is something easily handled by PowerShell." > Why not just share the solution here since it is an easy task for you?
That's not how things work here. We don't simply give you the solution to what is obviously a class project. You have to show your work and ask relevant questions and we will guide you, but no one here it going to do it for you.
 
That's not how things work here. We don't simply give you the solution to what is obviously a class project. You have to show your work and ask relevant questions and we will guide you, but no one here it going to do it for you.

Why is this a class project? You are so weird. I have daily documents to store in folders and I want to name it with a number and date. Quite amazed that you think anyone who stores data by numbers and dates are consider as a class project, this is the most common way to label a folder.

Think about this I started doing my research on 14 Jan 2025, and I want to save all my documents into a folder [1 140125] so in the future I know I started my research on 14 Jan 2025 because the folder name is number 1 and the date is 140125 so I can refer to it in future to know the date and order of different documents saved in different folders.

"You have to show your work and ask relevant questions" This is already shown in my first post, please read my first post, I even show you screenshot of what I have done and questions are asked in my first post and what I have done is also written in my first post.
 
Last edited:
I want to keep on creating new folders with first number increasing and date increasing forever everyday like this
[1 140125] meaning folder number 1, date is 14 (meaning 14th of that month), month is 01 (meaning Jan), year is 25 (meaning 2025)
Does the folder number part have any functional meaning? Or it is just used for ordering purposes?
If it is for ordering purposes, then instead of
[1 140125]
use this (year first, month, date) - and all folders will be already ordered.
250114
I manually create the 28 folders seen above, I am looking for a faster way to create new folders with the same naming convention.
If you want to create folders faster, then just write a script( .bat file), that does this. All folders created with a single double-click.
mkdir "c:\folders\folder 1"
mkdir "c:\folders\folder 2"
...
mkdir "c:\folders\folder n"
 
Why is this a class project? You are so weird. I have daily documents to store in folders and I want to name it with a number and date. Quite amazed that you think anyone who stores data by numbers and dates are consider a class project, this is the most common way to label a folder.

Think about this I started doing my research on 14 Jan 2025, and I want to save all my documents into a folder [1 140125] so in the future I know I started my research on 14 Jan 2025 because it the folder name is number 1 and the date is 140125 so I can refer to it in future to know the date and order of different documents saved in different folders.

"You have to show your work and ask relevant questions" This is already shown in my first post, please read my first post, I even show you screenshot of what I have done and questions are asked in my first post and what I have done is also written in my first post.
This is simple. You walk in, put up some text and ask "Now how do I automate this?" No explanations, no preambles. This behaviour points directly to someone that's simply too lazy to do their own work and want us to do it for them.
 
Does the folder number part have any functional meaning? Or it is just used for ordering purposes?
If it is for ordering purposes, then instead of
[1 140125]
use this (year first, month, date) - and all folders will be already ordered.
250114

If you want to create folders faster, then just write a script( .bat file), that does this. All folders created with a single double-click.
mkdir "c:\folders\folder 1"
mkdir "c:\folders\folder 2"
...
mkdir "c:\folders\folder n"
The folder number is just for ordering purposes only, no functional meaning.

I am not used to the format 250114, I would like to continue the order [1 140125]

How to use/write a script( .bat file)? I do not know how to write a script and never use a .bat file before.
 
Last edited: