So i have been tasked with getting folder and file names for a portable hard drive. Currently I'm not sure how to go about doing this I know the standard command prompt way to go about it, but let's say it's over a million files spread across about 20,000 folders on a terabyte hard drive. So I'm curious if anyone can point me into a starting direction for this. In a nut shell what I would like to do is execute a .bat file that would create a text file with the directory as a header then all files in that folder listed below that directory name but have this cycle through the entire hard drive if this is possible? Or if some one knows if there is a better way to do this, just looking for a direction to start with.
C:/test/folder Alpha
filename112.text
filename221.tif
filename331.gif
C:/test/folder Bravo
filename1.text
filename2.tif
filename3.gif
C:/test/Folder Charlie
filename112.png
filename221.aspx
filename331.jpeg