Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: ? How get equivalent of cmd line dir > prn ?

30 Jan 2010   #1
highmeadowhiker

Win 7 Pro 64-bit
 
 
? How get equivalent of cmd line dir > prn ?

Those who have never in their lives used any DOS, or the fake DOS CMD remnants embedded in Windows since Win 2000, will probably not understand why I would ever be using anything resembling a "command line."

I used the command line DIR > PRN, where PRN is the default printer device, for longer than a quarter century, for specific reasons. This yields a fairly concise listing with much information. I thought that Win XP allowed this from a (pseudo)DOS prompt; maybe I remember incorrectly, and this worked only on earlier Windows versions.

I have just figured out (stumbled onto) how to get a "command line prompt" in Win 7. Hit the Windows key, and type CMD into the search field. I can get a DIR on a given drive OK. But DIR > PRN warns me that the file, presumably PRN, cannot be found. So just since I started typing this post, I stumbled around and guessed that I could redirect the DIR to a txt file in some convenient directory. This works.

I got to a pseudo-DOS screen, by hitting the Windows key, typing CMD, then typing DIR > listing.txt (could be any filename)

The DIR listing was redirected to a new file, which I could then print by any of several means.

Anybody suggest a shorter path to getting a DOS-like DIR printout?


My System SpecsSystem Spec
.
30 Jan 2010   #2
pparks1

Windows 7 Ultimate x64
 
 

Microsoft has included a command line interface in all of their operating systems. Being a long time computer user myself, there are a number of things that I do from the command line and wouldn't have it any other way. BTW: I'm also a Linux admin...so I'm very comfortable at a command line interface.

I've been doing to the redirect to a file from the Windows and Linux command line for a number of years. I'm not aware of any quicker way.
My System SpecsSystem Spec
31 Jan 2010   #3
WindowsStar

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

You can do it within Windows Explorer with this: How to add the Print Directory feature for folders in Windows XP, in Windows Vista, or in Windows 7

or

Context Menu - Add View and Print File Directory - Vista Forums

OR

If you really want to do it from the Command Prompt

dir > %temp%\dirlist.txt & notepad /p %temp%\dirlist.txt
My System SpecsSystem Spec
.

31 Jan 2010   #4
nechan

win7.7100x64
 
 

hi

I'm not sure if I really understand what you want to do, but try this: Windows 7 Blog | Inhalt der Eingabeaufforderung kopieren

basically with the command: "dir | clip" you get the whole output of the command (dir) into the windows clipboard.
My System SpecsSystem Spec
29 Jun 2013   #5
spxy

W7 U x64
 
 

Quote   Quote: Originally Posted by nechan View Post
hi

I'm not sure if I really understand what you want to do, but try this: Windows 7 Blog | Inhalt der Eingabeaufforderung kopieren

basically with the command: "dir | clip" you get the whole output of the command (dir) into the windows clipboard.
thanks for that!

also, you might find useful a trick to open command line (cmd) in your current explorer folder: Just press Shift+RMB, and you should get a 'hidden' context menu : "Open command window here"
then use aforementioned "dir | clip", and you're good to go.
My System SpecsSystem Spec
Reply

 ? How get equivalent of cmd line dir > prn ?




Thread Tools




Similar help and support threads
Thread Forum
cmd line way to mute line in realtek hd audio card
I have a line of music audio entering my realtek card to accompany a powerpoint slideshow, together they go out on our community cable channel. I need to kill the input, the music audio that is directly plugged into the card in the back of the pc, so that when I schedule a video (bod meeting...
Sound & Audio
P67 Equivalent for the New Haswell
I currently have an Asus P8P67 REV 3.1 motherboard that is great with my 3770k. I am looking into getting the new 4770K i7 which uses the new LGA 1150 socket. What would the P67 equivalent be for the new Haswell CPU? Please don't recommend any brands, just the chipset. I appreciate the...
Hardware & Devices
setting password - line 1, black dots : line 2, letters & numbers
When setting a password for user, when I type it, it shows up as black dots but when I retype the next line, it shows up as the letters, numbers and symbols that I'm typing. It won't let me set it. What the heck is going on? Thanks
General Discussion
Line by line justification of text in Word 2007
Hello I would like to know if its possible (and how to do it if so) to justify a paragraph of text in Word 2007 to gradually get narrower. What I mean is, id like the first line of text to be longer than the one after and so on until I end up with something like this: ...
Microsoft Office
Which card is the equivalent to..
My 2 gtx 550 ti in SLi. They are both overclocked to 1ghz. I have an amd board and am using the SLi hack right now. It's becoming a real headache installing new drivers and I would like to move back to 1 (or 2 in crossfire to avoid hack) card that's at least equal or better.
Graphic Cards
%ProgramFiles(x86)% Equivalent
Does anyone know the equivalent for using %ProgramFiles(x86)% for locating something installed other than in the C: drive? Trying to path J: without using J:\Program Files (x86)
Hardware & Devices


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 13:02.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App