Share via

List files with path using Windows command line

Anonymous
2021-01-28T18:11:53+00:00

I would an output txt file to list the entire path using a windows command line to a txt file.

I want the output to be like this:   C:\Folder 1\folder 2\file.doc

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

3 answers

Sort by: Most helpful
  1. Anonymous
    2021-01-28T18:38:31+00:00

    Here you go:

    dir  /s  /b  /a-d  "dir c:\Users\John Doe"  > FileList.txt

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-01-29T21:26:07+00:00

    This command line worked but what about paths longer than +260 characters only?

    Some aspects of Windows support long paths, others don't. I recommend you keep your paths below 255 characters. If you must go beyond then this Google search will yield a number of hints:

    Windows long paths

    0 comments No comments
  3. Anonymous
    2021-01-29T18:05:23+00:00

    This command line worked but what about paths longer than +260 characters only?

    0 comments No comments