Sometimes when sharing something, you need to provide a list of resources inside a folder. While screenshots can work, they become cumbersome if there are many subdirectories. Therefore, you can use the following .bat file to list all resources in the current directory, including those in subdirectories, into a .txt document.
Create a new .txt document with any name, then copy and paste the following code.
@echo off dir /s/b *.* > list.txt exit
After saving, change the extension of the new .txt document to .bat. Then, copy the .bat file to the folder where you want to list the files and run it. The results will be output to a list.txt text document.

This method is particularly suitable for situations with complex folder structures and many files. For example, if you have a movie folder organized by year and genre into several subdirectories, running this .bat file will list all movie paths, making it easy to share with others.

Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.