



I've tried codes that were suggested by answers to similar questions which suggest using The list must not contain the files' paths. I wanted to use a batch file to create and export a list of only filenames contained within folders and subfolders. Here's the original Batch File List files in directory, only filenames? This is indeed a practical duplicate question for which I have a better answer but I cannot comment in the original because I have just joined stackflow and so don't have enough reputation points.
