Declan
November 5, 2013, 3:45am
1
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
Keeve
November 5, 2013, 4:20am
2
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.
Declan
November 5, 2013, 4:23am
3
Thanks Keeve, i will try that now.
Declan
md2000
November 5, 2013, 4:33am
4
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.
Declan
November 5, 2013, 4:46am
5
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
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 Has an easy to use free version of a directory printer that gives many options and various outputs including notepad and Word.
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.
Declan
November 7, 2013, 4:30am
8
Thank you for all your replies.
Declan
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
ZenBeam
November 16, 2013, 2:38pm
10
Just for completeness, If you hold down <Alt> and press PrintScreen, it sends a picture of only the current window to the clipboard.
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!