Reputation: 1434
I have around 30K files under various subfolders. I need the cmd command to print the list of all the 30K files and only the filenames not the folders.
Upvotes: 2
Views: 2225
Reputation: 70923
edited to include file redirection
>"x:\targetFile.txt" (for /r %a in ("x:\startFolder\*") do @echo %~nxa)
Just a recursive enumeration of the files. For each file found echo to console the name and extension of the file.
Upvotes: 2