Search code examples
windowsfileexportfile-listing

Export list of files (and folder structure) to a file (Windows 10)


Is there a quick way to list all files in a folder and send that list to a text or csv file? In addition to the files in the current folder, I want to include files in subfolders (nested) and I want the list to include relative path information.


Solution

  • Two options depending on what you are looking for.

    Run the commands from a command prompt in the topmost folder.

    tree > OutputFile.txt

    Or

    dir /s > OutputFile.txt