# print directory question

**URL:** <https://boards.straightdope.com/t/print-directory-question/673121>\
**Category:** Factual Questions\
**Created:** [November 5, 2013, 3:45am UTC](https://boards.straightdope.com/t/print-directory-question/673121 "2013-11-05T03:45:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Declan](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@Declan](https://boards.straightdope.com/u/Declan)\
**Post date:** [November 5, 2013, 3:45am UTC](https://boards.straightdope.com/t/print-directory-question/673121/1 "2013-11-05T03:45:54Z")

</div>

I am running windows 7 and I would like to know if there is a way to print the contents of a directory.

The keyboard still has a print screen button, but not sure what that actually does any more.

Declan

---

<div class="post-metadata">

**Author:** ![Keeve](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Keeve](https://boards.straightdope.com/u/Keeve)\
**Post date:** [November 5, 2013, 4:20am UTC](https://boards.straightdope.com/t/print-directory-question/673121/2 "2013-11-05T04:20:39Z")

</div>

the Print Screen button sends a picture of the screen to the clipboard. Then you can go into your word processor, paste the picture, and print it.

---

<div class="post-metadata">

**Author:** ![Declan](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@Declan](https://boards.straightdope.com/u/Declan)\
**Post date:** [November 5, 2013, 4:23am UTC](https://boards.straightdope.com/t/print-directory-question/673121/3 "2013-11-05T04:23:03Z")

</div>

> [@Keeve](#):
>
> the Print Screen button sends a picture of the screen to the clipboard. Then you can go into your word processor, paste the picture, and print it.

Thanks Keeve, i will try that now.

Declan

---

<div class="post-metadata">

**Author:** ![md2000](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@md2000](https://boards.straightdope.com/u/md2000)\
**Post date:** [November 5, 2013, 4:33am UTC](https://boards.straightdope.com/t/print-directory-question/673121/4 "2013-11-05T04:33:40Z")

</div>

Or open a DOS box (start - type CMD)  
In the DOS command box type CD \<name of directory\>. i.e.  
CD C:\USERS\myname\DOCUMENTS  
you can copy this from the top box in windows explorer… then type  
DIR  
To create a copy of what your command outputs, type for example  
DIR \> C:\DIRLIST.TXT  
Then go to C:. and click on the DIRLIST file, and there’s your directory in text.

DIR has lots of options. Use /? to see them all.  
For example, DIR /W gives a list of only filenames, no dates etc.

> [@](#):
>
> C:\Users\MainUser\Documents\>dir /?  
> Displays a list of files and subdirectories in a directory.
> 
> DIR [drive:][path][filename] [/A[[:]attributes]] \*\* [/C] [/D] [/L] [/N]  
> [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]
> 
> [drive:][path][filename]  
> Specifies drive, directory, and/or files to list.
> 
> /A Displays files with specified attributes.  
> attributes D Directories R Read-only files  
> H Hidden files A Files ready for archiving  
> S System files I Not content indexed files  
> L Reparse Points - Prefix meaning not  
> /B Uses bare format (no heading information or summary).  
> /C Display the thousand separator in file sizes. This is the  
> default. Use /-C to disable display of separator.  
> /D Same as wide but files are list sorted by column.  
> /L Uses lowercase.  
> /N New long list format where filenames are on the far right.  
> /O List by files in sorted order.  
> sortorder N By name (alphabetic) S By size (smallest first)  
> E By extension (alphabetic) D By date/time (oldest first)  
> G Group directories first - Prefix to reverse order  
> /P Pauses after each screenful of information.  
> /Q Display the owner of the file.  
> /R Display alternate data streams of the file.  
> /S Displays files in specified directory and all subdirectories.  
> /T Controls which time field displayed or used for sorting  
> timefield C Creation  
> A Last Access  
> W Last Written  
> /W Uses wide list format.  
> /X This displays the short names generated for non-8dot3 file  
> names. The format is that of /N with the short name inserted  
> before the long name. If no short name is present, blanks are  
> displayed in its place.  
> /4 Displays four-digit years
> 
> Switches may be preset in the DIRCMD environment variable. Override  
> reset switches by prefixing any switch with - (hyphen)–for example, /-W.

You can do really useful things with the DOS commands and the “\>” pipe to file command.

---

<div class="post-metadata">

**Author:** ![Declan](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@Declan](https://boards.straightdope.com/u/Declan)\
**Post date:** [November 5, 2013, 4:46am UTC](https://boards.straightdope.com/t/print-directory-question/673121/5 "2013-11-05T04:46:20Z")

</div>

> [@md2000](#):
>
> Or open a DOS box (start - type CMD)  
> In the DOS command box type CD \<name of directory\>. i.e.  
> CD C:\USERS\myname\DOCUMENTS  
> you can copy this from the top box in windows explorer… then type  
> DIR  
> To create a copy of what your command outputs, type for example  
> DIR \> C:\DIRLIST.TXT  
> Then go to C:. and click on the DIRLIST file, and there’s your directory in text.
> 
> DIR has lots of options. Use /? to see them all.  
> For example, DIR /W gives a list of only filenames, no dates etc.  
> You can do really useful things with the DOS commands and the “\>” pipe to file command.

That did exactly what I wanted, just had to run cmd as admin

Declan

---

<div class="post-metadata">

**Author:** ![Chickenwrangler](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chickenwrangler/32/91_2.png) [@Chickenwrangler](https://boards.straightdope.com/u/Chickenwrangler)\
**Post date:** [November 6, 2013, 9:30am UTC](https://boards.straightdope.com/t/print-directory-question/673121/6 "2013-11-06T09:30:56Z")

</div>

As “Keve” said the Print Screen button sends a picture of the screen to the clipboard you can then paste it into Paint or Word or any graphic program.

Win7 also has a “Snipping Tool” (under accessories) which is useful for capturing part of the screen.

[http://www.infonautics.ch/directorylistprint/index.htm](http://www.infonautics.ch/directorylistprint/index.htm) Has an easy to use free version of a directory printer that gives many options and various outputs including notepad and Word.

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [November 6, 2013, 12:22pm UTC](https://boards.straightdope.com/t/print-directory-question/673121/7 "2013-11-06T12:22:28Z")

</div>

Another method (Windows Vista and later versions):

- highlight the files in any window
- shift-right-click
- select Copy as Path
- paste file list into any document

This does give you the entire path, though, not just the file/folder name.

---

<div class="post-metadata">

**Author:** ![Declan](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@Declan](https://boards.straightdope.com/u/Declan)\
**Post date:** [November 7, 2013, 4:30am UTC](https://boards.straightdope.com/t/print-directory-question/673121/8 "2013-11-07T04:30:22Z")

</div>

Thank you for all your replies.

Declan

---

<div class="post-metadata">

**Author:** ![PatriotX](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@PatriotX](https://boards.straightdope.com/u/PatriotX)\
**Post date:** [November 16, 2013, 3:53am UTC](https://boards.straightdope.com/t/print-directory-question/673121/9 "2013-11-16T03:53:49Z")

</div>

> [@Declan](#):
>
> I am running windows 7 and I would like to know if there is a way to print the contents of a directory.
> 
> The keyboard still has a print screen button, but not sure what that actually does any more.
> 
> Declan

open powershell

Get-ChildItem \<directory path\> | Out-Printer

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [November 16, 2013, 2:38pm UTC](https://boards.straightdope.com/t/print-directory-question/673121/10 "2013-11-16T14:38:58Z")

</div>

> [@Keeve](#):
>
> the Print Screen button sends a picture of the screen to the clipboard. Then you can go into your word processor, paste the picture, and print it.

Just for completeness, If you hold down \<Alt\> and press PrintScreen, it sends a picture of only the current window to the clipboard.

---

<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:** [November 17, 2013, 12:25am UTC](https://boards.straightdope.com/t/print-directory-question/673121/11 "2013-11-17T00:25:02Z")

</div>

> [@Ximenean](#):
>
> Another method (Windows Vista and later versions):
> 
> - highlight the files in any window
> - shift-right-click
> - select Copy as Path
> - paste file list into any document
> 
> This does give you the entire path, though, not just the file/folder name.

Son of a GUN! I asked a similar question here a few days ago, and didn’t get this answer. Exactly what I wanted! Thanks!
