Home Experience & Tips Sharing Standard Post

Standard Post

How to Get a List of Resources in a Folder on Windows System

Sometimes when sharing things with others, you need to tell them the list of resources in a folder. Although screenshots can solve the problem, if there are many subdirectories, screenshots can be troublesome. Therefore, you can use the following bat file to list all resources in the current directory, including subdirectory resources, into a txt document. Create a new txt document, name it arbitrarily, then copy and paste the following...

Updated on February 18, 2025 About 1 minute read
Windows系统获取文件夹里面资源列表的方法

Sometimes when sharing things with others, 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, name it whatever you like, then copy and paste the following code snippet.

@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 count the file list and run it. The results will be output to a list.txt text document.

Snipaste 2025 02 18 09 05 28

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

2.2/5 - (4 votes)
Previous 【2026 Latest】Vultr Illustrated Website Building Tutorial | Baota Panel + WordPress Zero-Basics Step-by-Step Guide Continue reading content around the same timeline. Next WordPress Markdown Editor Recommendations: Markup Markdown & WP Editor.md View the next related tutorial or experience.

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: