Help w/ batch file to output dir listings in subdirectories
Posted: 03 Jan 2014 14:59
I've got a folder hierarchy in which I need to create a directory listing inside each main folder, showing the result of "dir /b /s *.* > index.txt".
For example, in
root folder
root folder\main_folder_1\some_more_subfolders\files
root folder\main_folder_2\some_more_subfolders\files
I need to be able to run a batch from within \root folder\. That batch needs to deposit a separate index.txt file into each \main_folder_#\ containing the contents of \main_folder_#\ and its subfolders. I've been able to output a main directory index.txt file into \root folder\ but I can't figure out how to deposit separate index.txt files into each \main_folder_#\ branch. Any help would be appreciated!
m1
For example, in
root folder
root folder\main_folder_1\some_more_subfolders\files
root folder\main_folder_2\some_more_subfolders\files
I need to be able to run a batch from within \root folder\. That batch needs to deposit a separate index.txt file into each \main_folder_#\ containing the contents of \main_folder_#\ and its subfolders. I've been able to output a main directory index.txt file into \root folder\ but I can't figure out how to deposit separate index.txt files into each \main_folder_#\ branch. Any help would be appreciated!
m1