If we need to get a lot of folder names quickly, how to do that? Let take the months as an example.
There are 12 folders named after months in the Test folder.
![How To Quickly Get Folder Names How To Quickly Get Folder Names](https://www.myofficetricks.com/wp-content/uploads/2021/09/image-4.png)
Now we create a new text document and name it. Open and type [Dir> 1.text] in this document, remember to save it.
![How To Quickly Get Folder Names How To Quickly Get Folder Names](https://www.myofficetricks.com/wp-content/uploads/2021/09/image-5.png)
Chang its suffix [text] into [bat].
![How To Quickly Get Folder Names How To Quickly Get Folder Names](https://www.myofficetricks.com/wp-content/uploads/2021/09/image-6.png)
Of course, we hit Yes.
![How To Quickly Get Folder Names How To Quickly Get Folder Names](https://www.myofficetricks.com/wp-content/uploads/2021/09/image-7.png)
You will find the original text document type has been changed to Windows Batch File.
Now we double-click it to run. There will appear a new text document.
![How To Quickly Get Folder Names How To Quickly Get Folder Names](https://www.myofficetricks.com/wp-content/uploads/2021/09/image-8.png)
Just open it. This contains all the names of the folders. That’s easy, right?
![How To Quickly Get Folder Names How To Quickly Get Folder Names](https://www.myofficetricks.com/wp-content/uploads/2021/09/image-9.png)
Leave a Reply