Method of generating a list of all content in a folder.

Discussion in 'Helpdesk' started by Jenkins, Apr 21, 2021.

  1. Jenkins

    Jenkins Well-Known Member

    Joined:
    May 30, 2019
    Threads:
    65
    Messages:
    0
    Likes Received:
    10
    I know this is possible - as someone once showed me how to do it. It involved inputting a command in CMD, which I don't remember.

    We all know you can select all the folders, hold down SHIFT and click 'copy as path' - and then copy paste into something like Excel, notepad or whatever - but what I'm looking for something that shows all folders - and all *files* within those folders.

    Does anyone know how to do this? I'd really appreciate the help.
     
  2. Loading...


  3. acciojay

    acciojay Well-Known Member Uploader Donor

    Joined:
    Apr 8, 2017
    Threads:
    401
    Messages:
    846
    Likes Received:
    1,138
    Go to your folder, in the explorer bar type cmd to open the command window within that folder

    [​IMG]

    When cmd opens type

    dir /b /on>List.txt
    And a txt file should be made with the list of items in order within the folder :)
     
    aj2811, medicine and Jenkins like this.
  4. Jenkins

    Jenkins Well-Known Member

    Joined:
    May 30, 2019
    Threads:
    65
    Messages:
    0
    Likes Received:
    10
    I appreciate the response - but the result shows only the contents of that folder - and not the contents of any sub-folder within that folder, which is what I'm looking for.
     
  5. Jenkins

    Jenkins Well-Known Member

    Joined:
    May 30, 2019
    Threads:
    65
    Messages:
    0
    Likes Received:
    10
    Finally found an answer. For anyone else wondering:

    1. Open the folder in question - click on the path bar and type cmd. This will open up cmd with the folder designated already.

    2. Copy paste the following string of text, without including quotation marks:
    "dir /s >listmyfolder.txt"

    Done.
     
    aj2811 likes this.
  6. acciojay

    acciojay Well-Known Member Uploader Donor

    Joined:
    Apr 8, 2017
    Threads:
    401
    Messages:
    846
    Likes Received:
    1,138
    Oh, for sub folders you add an /s to the command

    Not sure if it will be the "prettiest" list but it does list everything in the sub folders

    C:\Users\drive\Folder\Subfolder1\file
    C:\Users\drive\Folder\Subfolder2\file

    and so on
     
    Mizz and Jenkins like this.