Tôi có một thư mục trên ổ cứng chứa 1000 thư mục con. Những thư mục con này chứa các tệp và đôi khi nhiều thư mục con hơn. Bây giờ những gì tôi muốn có là một tập lệnh tạo tệp .txt cho mỗi thư mục ở cấp độ đầu tiên. Chúng sau đó chứa một danh sách các tên tệp và cuối cùng là tên của các thư mục con và thư mục con. Điều quan trọng là không nhồi nhét tất cả vào một tệp mà thành các tệp riêng biệt.
Nó sẽ giống như thế này
Name of the first folder.txt
Name of the second folder.txt
Name of the third folder.txt
Name of the fourth folder.txt
Name of the fifth folder.txt
Name of the sixth folder.txt
Và Tên của thư mục đầu tiên nên chứa một danh sách như thế này
Name of the first file.xyz
Name of the second file.zzz
Name of the third file.xyz
Name of the fourth file.zzz
Name of the fifth file.xyz
Name of Subfolder 1
Name of file.zzz
Name of another file.zzz
Name of Subfolder 2
Name of file.xyz
Name of Subsubfolder 1
Name of file.xyz
Name of file2.zzz
Bất cứ ai có thể giúp tôi?
—
user828591