# How do I print out a list of files on a CD-ROM?

**URL:** <https://boards.straightdope.com/t/how-do-i-print-out-a-list-of-files-on-a-cd-rom/252779>\
**Category:** Factual Questions\
**Created:** [June 29, 2004, 10:31pm UTC](https://boards.straightdope.com/t/how-do-i-print-out-a-list-of-files-on-a-cd-rom/252779 "2004-06-29T22:31:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Billdo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/billdo/32/315_2.png) [@Billdo](https://boards.straightdope.com/u/Billdo)\
**Post date:** [June 29, 2004, 10:31pm UTC](https://boards.straightdope.com/t/how-do-i-print-out-a-list-of-files-on-a-cd-rom/252779/1 "2004-06-29T22:31:25Z")

</div>

At work, I’ve been given a CD-ROM with bunch of files on it in a whole large tree of folder and sub-folders.

I would like to be able to print out a list of all of the files on the CD, prefarably listing the whole tree structure.

I’ve tried to do this in Windows Explorer (I’m using Windows XP), and it doesn’t seem to have any facility to print out a file list, much less the whole tree.

How can I do this? Thanks.

---

<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:** [June 29, 2004, 10:36pm UTC](https://boards.straightdope.com/t/how-do-i-print-out-a-list-of-files-on-a-cd-rom/252779/2 "2004-06-29T22:36:11Z")

</div>

[Agent Ransack](http://www.mythicsoft.com/agentransack/default.aspx) should do what you need - and it’s a handy piece of free software anyway.

---

<div class="post-metadata">

**Author:** ![Rex\_Fenestrarum](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rex_fenestrarum/32/7265_2.png) [@Rex\_Fenestrarum](https://boards.straightdope.com/u/Rex_Fenestrarum)\
**Post date:** [June 29, 2004, 10:57pm UTC](https://boards.straightdope.com/t/how-do-i-print-out-a-list-of-files-on-a-cd-rom/252779/3 "2004-06-29T22:57:52Z")

</div>

Open a command-prompt and type

**DIR (drive letter) /s \> c:\sample.txt**

So for example, if your CD-ROM drive is f:, the command would be:

dir f: /s \> c:\sample.txt

The /s switch is needed to recurse subdirectories and the path and\or filename can be anything you’d like, although I find it’s easier just to put it in the root of C:

Once the cursor reappears, close the command-prompt. You can then open the TXT file with NOtepad, Wordpad or Word.

🙂

---

<div class="post-metadata">

**Author:** ![MysteryFellow63427](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@MysteryFellow63427](https://boards.straightdope.com/u/MysteryFellow63427)\
**Post date:** [June 29, 2004, 11:04pm UTC](https://boards.straightdope.com/t/how-do-i-print-out-a-list-of-files-on-a-cd-rom/252779/4 "2004-06-29T23:04:06Z")

</div>

Rex told you what you need to know, but if you want additional formatting options, type  
**dir /?**

For example, if you add the **/b** option, you will get a simplified listing that doesn’t include file size, just the name.

---

<div class="post-metadata">

**Author:** ![yoyodyne](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@yoyodyne](https://boards.straightdope.com/u/yoyodyne)\
**Post date:** [June 30, 2004, 12:08am UTC](https://boards.straightdope.com/t/how-do-i-print-out-a-list-of-files-on-a-cd-rom/252779/5 "2004-06-30T00:08:25Z")

</div>

[This](http://www.karenware.com/powertools/ptdirprn.asp) is a great free program.
