# WinXP question: How do I generate a printable list of files?

**URL:** https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375
**Category:** Factual Questions
**Created:** [August 11, 2004, 4:31pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375 "2004-08-11T16:31:01Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://boards.straightdope.com/u/KGS)
#### Post date: [August 11, 2004, 4:31pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/1 "2004-08-11T16:31:01Z")

</div>

I have about 500 files in 3 directories that I want to create a printable list of, showing the file name & _exact_ file size in bytes. Does WinXP have a utility (or is there a freeware 3rd party program) that can do this automatically, as opposed to manually typing the details for each file in Word?

Basically I want the output to look something like this:

AAA.mpg 7,563,247 bytes  
BBB.mpg 632,993 bytes  
CCC.mpg 10,990,701 bytes  
etc.

---

<div class="post-metadata">

### Author: ![slortar](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@slortar](https://boards.straightdope.com/u/slortar)
#### Post date: [August 11, 2004, 4:50pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/2 "2004-08-11T16:50:35Z")

</div>

Hm. Normally when I need something like that I just open a command prompt and do something like this:

dir /s \> filename.txt

That’ll dump a full listing of the directory you’re currently in and all subdirectories into a text file called filename.txt

From there you can edit it with a word processor.

It won’t, however, do the formatting you require, although there might some esoteric combination of switches that’ll do it.

---

<div class="post-metadata">

### Author: ![Bewildebeest](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@Bewildebeest](https://boards.straightdope.com/u/Bewildebeest)
#### Post date: [August 11, 2004, 4:51pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/3 "2004-08-11T16:51:11Z")

</div>

I couldn’t figure out the copecetic way either. If you select a range of files, Windows wants to print them instead of just the directory listing.

However, you can start a command shell, and do dir \> listing. :rolleyes:

---

<div class="post-metadata">

### Author: ![GorillaMan](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@GorillaMan](https://boards.straightdope.com/u/GorillaMan)
#### Post date: [August 11, 2004, 4:55pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/4 "2004-08-11T16:55:36Z")

</div>

Open a DOS prompt window (from Accessories), and type:

DIR C:[folder wanted]\*.\* \> C:/files.txt

This outputs the directory list to ‘files.txt’; remove everything after _._ to show the output on the screen. Options for the DIR command are listed with ‘DIR /?’

Alternatively, you can use [Agent Ransack](http://www.mythicsoft.com/agentransack/default.aspx)

---

<div class="post-metadata">

### Author: ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)
#### Post date: [August 11, 2004, 5:41pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/5 "2004-08-11T17:41:07Z")

</div>

IIRC, there’s a tool that will allow you to copy file names from a directory to the clipboard, and from there you can paste it into the word processing program of your choice. It’s part of the power tools available from microsoft (which I think is a free download). I’ve never downloaded it, and don’t know what formatting options are available, but at least that gives you something to investigate.

---

<div class="post-metadata">

### Author: ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://boards.straightdope.com/u/KGS)
#### Post date: [August 11, 2004, 6:45pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/6 "2004-08-11T18:45:29Z")

</div>

> [@engineer\_comp\_geek](#):
>
> IIRC, there’s a tool that will allow you to copy file names from a directory to the clipboard, and from there you can paste it into the word processing program of your choice. It’s part of the power tools available from microsoft (which I think is a free download). I’ve never downloaded it, and don’t know what formatting options are available, but at least that gives you something to investigate.

What’s the program called? I may have the power tools already installed, I have no idea.

---

<div class="post-metadata">

### Author: ![spingears](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@spingears](https://boards.straightdope.com/u/spingears)
#### Post date: [August 11, 2004, 7:39pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/7 "2004-08-11T19:39:22Z")

</div>

> [@GorillaMan](#):
>
> Open a DOS prompt window (from Accessories), and type:
> 
> DIR C:[folder wanted]\*.\* \> C:/files.txt
> 
> This outputs the directory list to ‘files.txt’; remove everything after _._ to show the output on the screen. Options for the DIR command are listed with ‘DIR /?’
> 
> Alternatively, you can use [Agent Ransack](http://www.mythicsoft.com/agentransack/default.aspx)

You can’t open a dos prompt in XP!

---

<div class="post-metadata">

### Author: ![slortar](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@slortar](https://boards.straightdope.com/u/slortar)
#### Post date: [August 11, 2004, 7:43pm UTC](https://boards.straightdope.com/t/winxp-question-how-do-i-generate-a-printable-list-of-files/259375/8 "2004-08-11T19:43:44Z")

</div>

> [@spingears](#):
>
> You can’t open a dos prompt in XP!

Of course you can. Just go to start–\>run and type cmd in the box that pops up.
