Home » Questions » Computers [ Ask a new question ]

How to export a directory list from command prompt?

How to export a directory list from command prompt?

I have a folder full of media that I want to export to a list (csv, doc, xml, whatever...). When I navigate in Command Prompt to that folder, I can use dir to display the files in that directory. I want to export that list. How can I do this from command prompt?

Asked by: Guest | Views: 247
Total answers/comments: 2
bert [Entry]

"dir > textfile.txt

will export (pipe) it to a plain text file. You can do whatever you want with it afterwards.

If you wish to append, use two >>'s

dir >> textfile.txt

If you wish the file to be in another directory, just use

dir > c:\temp\textfile.txt

Without timestamp

dir/b

for example ?"
bert [Entry]

"Try that utility
File Names Export

It is very small and requires no installation."