Share via

How to create a report showing folder structure and files in a folder

Anonymous
2019-06-04T08:39:09+00:00

Good morning,

I have a requirement to produce a report (could be a PDF, Word doc or XLS) that shows all the folders/sub-folders below a given folder in Windows Explorer, so we can see the folder structure and analyze it. We also need a second report with the same criteria but also listing out all the files inside each folder. There are thousands of files under each folder so it will be large report. I have done something similar using the File System object model in VB before, but am wondering if there is a simple off-the-shelf tool or command we can use instead.

Thanks!

Paul

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

DaveM121 886.1K Reputation points Independent Advisor
2019-06-04T09:03:08+00:00

Hi Paul

Open File Explorer and navigate to that folder

In the address bar, just type cmd and hit Enter

That will open a Commend Prompt in that folder

Paste this into Command Prompt and hit Enter

dir /s/b > AAA.txt

Wait for that command to complete

That will have created a new text file in that folder - AAA.txt that will contain a listing of all files in that folder, including all sub-folders, which you can copy/paste into Word, Excel . . . etc.

If you just want to list files in a specific folder and not sub-folders, open a Command Prompt in that folder and run this command:

dir /b > AAA.txt

Was this answer helpful?

80+ people found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-06-04T08:50:23+00:00

    You may take Screen Shot of the Folder Structure.

    Add them in MS Word and Save the MS Word File as PDF.

    Hope this helps. 

    Thanks,

    Anish

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-06-04T09:24:15+00:00

    Hi Dave

    Great! just what I needed. I figured there must be an easy way to do it!

    Best

    Paul

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-06-04T09:23:24+00:00

    Thanks for the suggestion - I ran DaveM121's command (below) and that did the trick!

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments