# How to Get a List of File Names from a Windows Folder?

**URL:** <https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792>\
**Category:** Factual Questions\
**Created:** [November 13, 2013, 5:36am UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792 "2013-11-13T05:36:35Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Dewey\_Finn](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dewey_finn/32/4222_2.png) [@Dewey\_Finn](https://boards.straightdope.com/u/Dewey_Finn)\
**Post date:** [January 22, 2014, 6:14pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/21 "2014-01-22T18:14:19Z")

</div>

Did you notice the spammy post immediately preceding mine?

---

<div class="post-metadata">

**Author:** ![Duckster](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/duckster/32/1244_2.png) [@Duckster](https://boards.straightdope.com/u/Duckster)\
**Post date:** [January 22, 2014, 6:28pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/22 "2014-01-22T18:28:25Z")

</div>

> [@Dewey\_Finn](#):
>
> Did you notice the spammy post immediately preceding mine?

It’s not spam. Karen Kenworthy was well known in the Windows support community. Her tools are widely used. Her family still keeps her web site going so people can access/try/buy them. Apparently the receipts are donated to charity.

---

<div class="post-metadata">

**Author:** ![SlickRoenick](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@SlickRoenick](https://boards.straightdope.com/u/SlickRoenick)\
**Post date:** [January 22, 2014, 6:30pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/23 "2014-01-22T18:30:20Z")

</div>

> [@Dewey\_Finn](#):
>
> Did you notice the spammy post immediately preceding mine?

It isn’t spam. It’s very legit, despite the 1995 era website appearance.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 22, 2014, 6:30pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/24 "2014-01-22T18:30:28Z")

</div>

> [@Mangetout](#):
>
> I don’t believe there is any built in Windows way of doing this (and it’s less likely than ever that we’ll get one, since Windows is nudging users away from the notion of organising things neatly in folders themselves). There are freeware utilities for it though.

Why don’t you just use Windows Explorer to list the files you want and then cut and paste them into a text file? That’s prob what I’d do.

I would go your Command route because the “DIR” command is very flexible and you can use parameters like /B and /S and /O. Just open a Command Processor window (like in your example) and type: HELP DIR to get a list of all you can do with it. It’s the simplest way I know to list file names without a whole bunch of extra junk. You can use the /O option to sort the list or even use the SORT command (type: HELP SORT).

There are many freeware utilities to get file info. One of my favorites is: “Folder Size”. Just Google it. It’s a free download.

It doesn’t do what you want exactly. But you can make it work for you. It does a bunch of other useful stuff. It shows you how big each folder and it sorts them in order by size or by names and all the sub folders too - very useful. It’s very handy and does a bunch of other stuff that Windows Explorer doesn’t do.

There are also a bunch of two-pane explorers freeware that is real nice to have. Things like XPLORER2 and 2XPLORER. Just Google those. Very nice.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 22, 2014, 6:34pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/25 "2014-01-22T18:34:12Z")

</div>

> [@PatriotX](#):
>
> Why are you using DOS instead of PowerShell?
> 
> Get-ChildItem c:\a\ \> list.txt

I don’t think he means DOS. He means the Command Window. It just looks like DOS but it’s really part of WINDOWS.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 22, 2014, 6:36pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/26 "2014-01-22T18:36:27Z")

</div>

> [@Trinopus](#):
>
> I guess I’ll stick with what I’m doing, as it works, and isn’t too awfully complex.
> 
> I agree with **Mangetout** that Microsoft is moving away from common sense and into odd directions. I’m old enough to like the native file structure, and I dislike (and distrust) libraries and albums and crap.
> 
> Thanks, all!

They are not really “odd directions”. One of the people injured by the UNIBOMBER wrote some great articles explaining that the current approach to files and file systems is really defunct and there are much better ways of handling that. If you can find it, it’s worth a read.

---

<div class="post-metadata">

**Author:** ![Dewey\_Finn](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dewey_finn/32/4222_2.png) [@Dewey\_Finn](https://boards.straightdope.com/u/Dewey_Finn)\
**Post date:** [January 22, 2014, 6:37pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/27 "2014-01-22T18:37:23Z")

</div>

> [@SlickRoenick](#):
>
> > [@Dewey\_Finn](#):
> >
> > Did you notice the spammy post immediately preceding mine?
> 
> It isn’t spam. It’s very legit, despite the 1995 era website appearance.

**binaryman** has only posted once before, and that post was also to flog software. This post revived a thread that had been dormant for over two months and provides a link to an external site. That triggered my spam sensors.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 22, 2014, 6:39pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/28 "2014-01-22T18:39:28Z")

</div>

Sorry. Posted in Error. Tried to Delete but I couldn’t do that. I thought you could delete posts that were made in error.

---

<div class="post-metadata">

**Author:** ![Trinopus](https://avatars.discourse-cdn.com/v4/letter/t/2bfe46/32.png) [@Trinopus](https://boards.straightdope.com/u/Trinopus)\
**Post date:** [January 22, 2014, 8:22pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/29 "2014-01-22T20:22:02Z")

</div>

> [@Lazlo Hapsburg](#):
>
> Why don’t you just use Windows Explorer to list the files you want and then cut and paste them into a text file? That’s prob what I’d do. . . .

You make it sound so simple… How do you do that? If I use WE to list the files I want, and then cut and paste them – it cuts and pastes the files themselves, not the list of their names!

**Ximenean** explained how you shift-right-click and “Copy as Path.” That works!

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [January 22, 2014, 10:52pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/30 "2014-01-22T22:52:04Z")

</div>

a) Remove Windows drive containing the folder in question

b) Plug it into a Mac \*

c) Navigate to the folder, select contents and copy

d) Paste into text file

e) Reverse process

- Disclaimers: If your file names are longer than 32 characters or your disk is NTFS, you should be running something newer than the 15-year-old MacOS 9 when you do this. On the other hand, if your file names are short and it’s a FAT disk you could use the 26-year-old System 6. Or even the vintage-1984 System 1 if you could transfer the files to a Mac diskette first.  
Sorry, I _know_ this is annoying and I really don’t do so much of the Macintosh fanboyz stuff these days, but DAMN, how can an operating system lack the innate capacity to make it easy for users to obtain a freaking file listing as textstring? It’s something I need to do several times per year. It shouldn’t require programming skillz!

---

<div class="post-metadata">

**Author:** ![Dewey\_Finn](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dewey_finn/32/4222_2.png) [@Dewey\_Finn](https://boards.straightdope.com/u/Dewey_Finn)\
**Post date:** [January 22, 2014, 11:00pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/31 "2014-01-22T23:00:53Z")

</div>

It _doesn’t_ require “programming skillz” to get this information. As said upthread, “copy as path” is available via the shift-right-click menu and has been since Windows Vista. Since 2007 in other words.

So stop with the “Macintosh fanboyz stuff”.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [January 22, 2014, 11:19pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/32 "2014-01-22T23:19:19Z")

</div>

> [@Lazlo Hapsburg](#):
>
> They are not really “odd directions”. One of the people injured by the UNIBOMBER wrote some great articles explaining that the current approach to files and file systems is really defunct and there are much better ways of handling that. If you can find it, it’s worth a read.

I haven’t read that article, so it may be that he acknowledges these points, but frankly it sounds like a load of crap.

First, although smartphones, tablets, and (increasingly) desktop OSes go to great lengths to hide the filesystem, in all cases it’s still there driving things in the background. All of the specializing is just window dressing.

Second, all of this stuff only works as long as you aren’t doing anything too advanced. My phone allows me to take a picture, save it to the camera gallery, and then send it on over to my Dropbox account all without me seeing the filesystem. That’s great! But what if I (for instance) need to transfer some files to a system without a net connection? I plug the phone in, it mounts it like a flash drive, and I’m dropped into a filesystem. God help you if you try to do anything programmatic without a filesystem.

In short, although we’ll have increasing alternative ways of interacting with and searching for files, there’s zero evidence that the hierarchical filesystem is ever going away. A few half-hearted attempts have been made but none have stuck.

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [January 22, 2014, 11:20pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/33 "2014-01-22T23:20:16Z")

</div>

Well I’ll be damned. Way cool! I missed that in the earlier post.

I’ve always wanted to know how to do that from within Windows.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 22, 2014, 11:23pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/34 "2014-01-22T23:23:49Z")

</div>

> [@Trinopus](#):
>
> You make it sound so simple… How do you do that? If I use WE to list the files I want, and then cut and paste them – it cuts and pastes the files themselves, not the list of their names!
> 
> **Ximenean** explained how you shift-right-click and “Copy as Path.” That works!

You are quite right.

Apologies. I should have tried it before suggesting it.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 22, 2014, 11:25pm UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/35 "2014-01-22T23:25:16Z")

</div>

> [@Dr.Strangelove](#):
>
> I haven’t read that article, so it may be that he acknowledges these points, but frankly it sounds like a load of crap.

I understand. When computers occupied an entire room, the idea of a desktop computer sounded like a load of crap.

His name is David Gelernter and he is a Yale professor and he created a software package to illustrate his ideas. He is a very brilliant man and won some prestigious awards for his work.

His concept takes some thinking to understand.

If you Google him, you will find several other articles that explain what he did.

> **[David Gelernter](https://en.wikipedia.org/wiki/David_Gelernter)**
>
> David Hillel Gelernter (born March 5, 1955) is an American computer scientist, artist, and writer. He is a professor of computer science at Yale University.
> Gelernter is known for contributions to parallel computation in the 1980s, and for books on topics such as computed worlds (Mirror Worlds). Gelernter is also known for his belief, expressed in his book America-Lite: How Imperial Academia Dismantled Our Culture (and Ushered in the Obamacrats), that liberal academia has a destructive influence...

Gelernter received his Bachelor of Arts and Master of Arts degrees in classical Hebrew literature from Yale University in 1976 and his Ph.D. from S.U.N.Y. Stony Brook in 1982.

In the 1980s, he made seminal contributions to the field of parallel computation, specifically the tuple space coordination model, as embodied by the Linda programming system (named for Linda Lovelace, an actress in the porn movie Deep Throat, mocking Ada’s tribute to Ada Lovelace).[3] Bill Joy cites Linda as the inspiration for many elements of JavaSpaces and Jini.[4]

On June 24, 1993, Gelernter was critically injured opening a mailbomb sent by the Unabomber. He recovered from his injuries but his right hand and eye were permanently damaged.[5] He chronicled the ordeal in his 1997 book Drawing Life: Surviving the Unabomber.

He helped found the company Mirror Worlds Technologies, which in 2001 released Scopeware software using ideas from his 1992 book Mirror Worlds. Gelernter believed that computers can free users from being filing clerks by organizing their data. The company announced it would “cease operations effective May 15, 2004”. A related company Mirror Worlds, LLC recently had their patent infringement verdict against Apple, Inc. overturned in the Eastern District of Texas.

In 2003, he was nominated to and became a member of the National Council on the Arts.[6] In 2006, Gelernter joined the scientific advisory board of the Lifeboat Foundation.[7]

Gelernter contributes to magazines such as City Journal, The Weekly Standard, and Commentary which are generally considered neoconservative. For seven months, he contributed a weekly op-ed column to the LA Times.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [January 23, 2014, 12:36am UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/36 "2014-01-23T00:36:27Z")

</div>

> [@Lazlo Hapsburg](#):
>
> I understand. When computers occupied an entire room, the idea of a desktop computer sounded like a load of crap.

It’s not a question of technology–it’s in the application. Non-hierarchical systems have been tried already and found wanting. We have applied layers on top of the filesystem and in many cases it has proven useful, but nothing so far has replaced the underlying technology.

At any rate, I did find [this](http://online.wsj.com/news/articles/SB10001424052970203833104577072162782422558) article, which is 95% fluff but describes his notion of “streams”, which is a useful but extremely narrow form of organization. Not everything is inherently time-ordered. Hierarchical filesystems have the capability to adhere to any desired form of organization, including time-based, and we can apply additional filters and search tools to present other patterns.

If stream-based presentation were really the end-all and be-all, I think Google Wave would have been more popular. Instead, streams seem limited to social media, which are all about the now and the past is forgotten. Maybe it’s useful for some kinds of real-time collaboration as well, though as soon as anything useful is produced the results tend to be curated into a more useful data store.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 23, 2014, 12:56am UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/37 "2014-01-23T00:56:33Z")

</div>

> [@Dr.Strangelove](#):
>
> It’s not a question of technology–it’s in the application. Non-hierarchical systems have been tried already and found wanting. We have applied layers on top of the filesystem and in many cases it has proven useful, but nothing so far has replaced the underlying technology.

Did you not read the part where he started a company to market a product to sell to people so they could actually use his new technology and then that company was bought out by another company that is currently selling his product?

If it was just “fluff”, how could this company be making money and remain in business?

And why would he have won all these prestigious awards? These awards are not given out to the developers of “fluff”.

In any event, I think we are getting off topic here and so we should either start a new thread in the Great Debates forum and debate the issue there or just leave each other to pursue the technology we each believe to be best.

"Gelernter’s book Mirror Worlds (1991) “prophesied the rise of the World Wide Web.”[8] Bill Joy, founder and Chief Scientist of Sun Microsystems, says Gelernter is “one of the most brilliant and visionary computer scientists of our time.”[8] The New York Times called him a computer science “rock star”.[9]”

Best of luck to you.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [January 23, 2014, 1:13am UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/38 "2014-01-23T01:13:07Z")

</div>

> [@Lazlo Hapsburg](#):
>
> Did you not read the part where he started a company to market a product to sell to people so they could actually use his new technology and then that company was bought out by another company that is currently selling his product?

What it said was:  
_He started a company to pursue his vision, but it was not well conceived and went out of business after a few years. Today its patents, now owned by an investor group, are at the center of a major lawsuit with Apple. … In April, the judge in the case overruled the jury and tossed out the award. The matter is now under appeal._

In other words, no one wanted their tech, but after they went under some patent trolls bought them out and sued Apple. The judge saw through the nonsense but the trolls are appealing (or were, 3 years ago).

> [@Lazlo Hapsburg](#):
>
> If it was just “fluff”, how could this company be making money and remain in business?

I said the article was fluff, not the tech. Bios can be interesting but aren’t relevant to the technology. Whether it works well or not has nothing to do with the Unabomber targeting the guy.

At any rate, I didn’t say streams are useless, just that they only have a narrow range of applicability. The utility of filesystems comes from their generality.

If filesystems do get replaced, it won’t be with streams or any other presentation layer, but rather with databases. A stream is one way of looking at the data, but not the only way.

---

<div class="post-metadata">

**Author:** ![pohjonen](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pohjonen/32/423_2.png) [@pohjonen](https://boards.straightdope.com/u/pohjonen)\
**Post date:** [January 23, 2014, 1:17am UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/39 "2014-01-23T01:17:50Z")

</div>

A few operating systems ago, I used a program called Karen’s Directory Printer to print out a list of all my music. Don’t know how up to date the program is now, but it still shows up in google.

---

<div class="post-metadata">

**Author:** ![Charlie\_Wayne](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@Charlie\_Wayne](https://boards.straightdope.com/u/Charlie_Wayne)\
**Post date:** [January 23, 2014, 1:27am UTC](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792/40 "2014-01-23T01:27:55Z")

</div>

> [@Dr.Strangelove](#):
>
> What it said was:  
> _He started a company to pursue his vision, but it was not well conceived and went out of business after a few years. Today its patents, now owned by an investor group, are at the center of a major lawsuit with Apple. … In April, the judge in the case overruled the jury and tossed out the award. The matter is now under appeal._
> 
> He started a company to pursue his vision, but it was not well conceived and went out of business after a few years. Today its patents, now owned by an investor group, are at the center of a major lawsuit with Apple. … In April, the judge in the case overruled the jury and tossed out the award. The matter is now under appeal.
> 
> In other words, no one wanted their tech, but after they went under some patent trolls bought them out and sued Apple. The judge saw through the nonsense but the trolls are appealing (or were, 3 years ago).

How strange!

I provided the following link to a Wiki article about Dr. Gelernter. [David Gelernter - Wikipedia](http://en.wikipedia.org/wiki/David_Gelernter)

You seem to dispute what I said about that article and you have said:  
What it said was:  
He started a company to pursue his vision, but it was not well conceived and went out of business after a few years. Today its patents, now owned by an investor group, are at the center of a major lawsuit with Apple. … In April, the judge in the case overruled the jury and tossed out the award. The matter is now under appeal.

In other words, no one wanted their tech, but after they went under some patent trolls bought them out and sued Apple. The judge saw through the nonsense but the trolls are appealing (or were, 3 years ago).  
The implication seems to be that you are saying that article said “it went out of business” among other things.

I took a second look at the article but I couldn’t find any of that anywhere.

I apologize to you if I am mistaken. But it appears to me that you just made this up and are trying to make it look like it was part of the article.

If I am mistaken, I apologize. But if that is true, then I believe you are being dishonest.

[Previous page](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792.md?page=1)

[Next page](https://boards.straightdope.com/t/how-to-get-a-list-of-file-names-from-a-windows-folder/673792.md?page=3)
