How to add a new folder to all subfolders in Windows11

New year is coming and in order to file items for each year I create a new folder under various subfolders, that are already made and being used. Lets sat year 2025 is now coming and I want to add subfolder '2025' to all subfolders. Each subfolder has a different name and path. Rather than creating new folder '2025' in each subfolder I want to automatically create new folder in each subfolder and there are many. Online, I see creating folder and subfolder in a specific folder, but not creating a new folder in subfolders with different names and paths. Is there any easier way to do so, with one clinic, like creating new folder in main folder. Would appreciaye some guidance.

Thanks

Hello,Loveleen Parmar

Welcome to posting in the Microsoft Community.

I understand that you want to automatically add a new folder named “2025” to all subfolders in Windows 11, this can be done using a batch script, you can try the following steps.

1. Open the Notepad application on your computer.

2. Copy the following code into Notepad:

@echo off  
for /d %%i in ("Home Folder Path\*") do (  
    mkdir "%%i\2025"  
)

Replace the main folder path with the main folder path that contains all subfolders. For example: C:\Users\YourName\Documents\MainFolder.

3. When you save the file, select the “File Type” as “All Files” and make sure that the file name has a .bat suffix, or you can uncheck the “...” checkbox in File Explorer. ...> Options > View > Hide folder extensions of known types” in File Explorer, and then manually change the .txt file to .bat extension.

4. Double-click to run this file

Note: Before running the script, it is recommended to back up important data in case the path is wrong and causes accidental changes. If the main folder requires administrator privileges, please right-click the script file and select “Run as administrator”.

Please let me know if you have any other needs and I will answer them further.Wishing you and your family a Merry Christmas filled with joy and warmth!

Best Regards,

Rota|Microsoft Community Support Specialist

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 17, 2025 Views 150 Applies to: