Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Re: PlainText ver - EXTREMELY USEFUL INFO - Printing Directory Listings

Reply
Thread Tools Display Modes

Re: PlainText ver - EXTREMELY USEFUL INFO - Printing Directory Listings

 
 
Dave
Guest
Posts: n/a

 
      11-22-2009

Hi Stan,

Nice work!
If you are using Vista or Windows 7, it is much easier
to use the Snipping Tool! With only several clicks,
you can capture anything on the screen and then
either save it as a file or send it to an e-mail recipient.
You can use one of four different snips, including a
freehand one!
I keep it pinned to my taskbar so I can get to it whenever
I need it. It is also very useful to "grab" some copy from a
webpage (especially if they have blocked ctrl/p!)

Dave


"Stan Starinski" <China@stealsUSJobsPatentsSoftwareMusicVideo> wrote in
message news:...
> Goto:
> http://windowsdevcenter.com/pub/a/wi...rectories.html
>
>
> Printing Directory Listings
> "How can I print thee? Let me count the ways...."
>
> "Liz Browning would probably have written something like that in
> her blog if she lived today. Imagine her writing poetry on her laptop and
> saving it in a folder named C:\Sonnets, when suddenly she gets
> an email from her publisher saying he needs the titles of all the poems
> she's written so far. So Liz opens Windows Explorer and selects the
> C:\Sonnets folder to display a list of sonnets in the right-hand
> pane (Figure 1). Then she wonders, How can I print a list of titles of
> these files?"
>
> Funny how often users need to do this, yet there's no simple way to
> accomplish the simple task through the Windows GUI. Of course, if you are
> familiar with the command line or can do some scripting, it's not
> difficult. So, out of curiosity I decided to "count" the ways this simple
> task could be done in Windows; here's what I came up with.
>
> 1. Using the Command Line
> The simplest way is to use the good old dir command with the /b switch to
> suppress everything except the filenames. For example, to display the
> names of files in C:\Sonnets, you do the following:
>
> C:\>dir c:\sonnets /b
> which produces:
> But only three in all God's universe.doc
> Go from me. Yet I feel that I shall stand.doc
> I lift my heavy heart up solemnly.doc
> I thought once how Theocritus had sung.doc
> The face of all the world is changed, I think.doc
> Thou hast thy calling to some palace-floor.doc
> Unlike are we, unlike, O princely Heart!.doc
>
>
> You can either redirect the output to a text file with:
>
> dir c:\sonnets /b > titles.txt
> Or you can redirect it to your default printer with:
>
> dir c:\sonnets /b > prn
> If you don't want to open a command-prompt window first, you can simply go
> to Start -> Run and type:
>
> cmd /c dir c:\sonnets /b > lpt1
> If the directory you want to list contains subdirectories, you can use
> tree instead of dir:
>
> cmd /c tree c:\sonnets /f > lpt1
> 2. Adding a Context Menu Item
> It would be nice to right-click on a folder in Windows Explorer and print
> a list of items in the folder, wouldn't it? This is easy to do by first
> creating the following batch script using Notepad:
>
> @echo off
> dir %1 /-p /o:gn > "%temp%\Listing"
> start /w notepad /p "%temp%\Listing"
> del "%temp%\Listing"
> exit
> Save this with some name like printdir.bat in your %windir% directory, and
> add "Print Directory Listing" to your context menu for Windows Explorer as
> follows. Open the Folder Options tool in Control Panel, select the File
> Types tab, and in the File Types column select the item labeled File
> Folder. Then click on the Advanced button, click on New, and specify a
> name for the action you want to perform and the batch file that performs
> it (Figure 2):
>
>
> Figure 2. Associating the batch file printdir.bat with the action "Print
> Directory Listing"
>
> Once you're done, you can right-click on a folder in Windows Explorer and
> print a list of the files it contains (Figure 3):
>
>
> Figure 3. Printing a directory listing from Windows Explorer
>
> This hack is cool, but it has a flaw when you implement it on XP: after
> you've implemented it, every time you try to open a folder using Windows
> Explorer, the Search Companion window opens instead of the folder you
> selected. The workaround is a quick Registry edit described in Knowledge
> Base article 321379, where this hack is found. Of course, you can further
> customize the hack by tweaking the syntax of the dir command or replacing
> it with tree, and so on.
>
> 3. Using Windows Script Host
> Windows Script Host lets you leverage the power of scripting languages
> like VBScript and JScript to automate almost any task you need to perform.
> For example, here's a simple JScript that will list the names of all the
> files in the C:\Sonnets folder:
>
> var fso, e, file;
> fso = new ActiveXObject("Scripting.FileSystemObject");
> e = new Enumerator(fso.GetFolder("c:\sonnets").files);
> for (e.moveFirst(); ! e.atEnd(); e.moveNext()) {
> file = e.item();
> WScript.echo(file.name);
> }
> Saving this script as listdir.js and running it with Cscript.exe, the
> command-line script interpreter for WSH, produces the expected output
> (Figure 4):
>
>
> Figure 4. Using WSH to print a directory listing
>
> I found this useful script snippet in the book Windows XP Under the Hood:
> Hardcore Windows Scripting and Command Line Power by Brian Knittel. It's a
> terrific resource if you're still new to WSH scripting and want to explore
> its flexibility and power.
>
> 4. Quick and Dirty
> Finally, if Liz doesn't feel confident working from the command line or
> developing scripts, she can send her publisher a directory listing of her
> C:\Sonnets folder using the following quick-and-dirty hack: press
> Alt-Print Screen, paste the contents of the clipboard into Paint, save it
> as a bitmap file, and send it as an email attachment. Obviously pretty
> crude, and you wouldn't think this approach would be worth its very own
> article in the Microsoft Knowledge Base, but you'd be wrong--heh!
>
>
> --------------------------------------------------------------------------------
>
>
>
> Showing messages 1 through 15 of 15.
>
> Print Directory
> 2009-11-20 05:58:15 Pinos [Reply | View]
>
>
> Use Print directory to print the directory listing to a file..
>
> Find Here : http://www.print-directory.com
> Output Directory contents to a txt file
> 2008-08-21 07:50:11 phillipsb [Reply | View]
>
>
> I foloowed the steps above, but I didn't want to have a hardcopy, I wanted
> to copy & paste the list into an excel file.
> I modified the script to be:
> @echo off
> dir %1 /b /-p /o:gn > "c:\Listing.txt"
> start /w notepad "c:\Listing.txt"
> exit
> Print Directory
> 2008-02-20 09:18:29 swat2002 [Reply | View]
>
>
> i use print directory software for this from ashisoft
>
> http://www.ashisoft.com
> Print Directory
> 2008-05-09 20:39:48 AllanIsKing [Reply | View]
>
>
> I use Directory Report
> http://www.file-utilities.com
>
> It can print to a printer,
> text, csv, xml and html files
>
> It can prints file attributes plus
> AVI, MP3, MSI, Version and WAV attributes
> Print Directory
> 2008-05-09 20:39:19 AllanIsKing [Reply | View]
>
>
> I use Directory Report
> http://www.file-utilities.com
>
> It can print to a printer,
> text, csv, xml and html files
>
> It can prints file attributes plus
> AVI, MP3, MSI, Version and WAV attributes
> even quicker and dirtier
> 2008-01-25 10:13:43 technopagan [Reply | View]
>
>
> I mucked around with this for an afternoon and freaking out when the
> folder settings changed to search mode.
>
> There is one more easy solution, I find.
> That will stop non-techies like me from having nightmares:
>
> browse to the directory in your browser.
> Then select text and put it in Word or a text editor.
> suppressing ".." and "." directories
> 2007-04-24 16:27:55 ramrodatron [Reply | View]
>
>
> Does anyone know a trick for supressing the output of the ".." and "."
> directories?
> print tree
> 2006-12-30 07:48:27 Blacky [Reply | View]
>
>
> I made a new print tree in the context menu in win explorer. but i woud to
> delete it houw????
> print tree
> 2006-12-30 07:48:18 Blacky [Reply | View]
>
>
> I made a new print tree in the context menu in win explorer. but i woud to
> delete it hou????
> use 'send to' menu
> 2005-01-24 22:21:37 menglis3 [Reply | View]
>
>
> after you've implemented it, every time you try to open a folder using
> Windows Explorer, the Search Companion window opens instead of the folder
> you selected. The workaround is a quick Registry edit described in
> Knowledge Base article 321379, where this hack is found.
>
> Rather than modify the context menu, I added a shortcut to the bat file to
> my send to folder:
> a) lets me run it against both directories and individual files,
> b) easier to remember where it is (both to modify and to share with
> others)
> c) doesn't require the regedit hack from KB321379
>
> caveat; WinXP-Pro SP1 with a lot of post SP2 updates, so...
> KB 321379 article URL
> 2005-01-05 19:06:25 ccharlton [Reply | View]
>
>
> http://support.microsoft.com/default...b;en-us;321379
> KB 321379 article URL
> 2006-10-01 14:13:31 talensc [Reply | View]
>
>
> KB 321379 article URL
> 2007-03-28 17:58:08 JeanW [Reply | View]
>
>
> I tried this little printdir batch program too. Now all of my folders open
> with ACDSee, which is a graphics viewing program. The KB321379 article is
> clear enough, but unfortunately it doesn't work.
>
> There is no "MODIFY" button in the EDIT menu where they say to change it.
> I thought maybe it was a permissions problem, but I have full permissions.
>
> It also says, in HKEY_CLASSES_ROOT\Directory\shell, in the Value data box,
> type none. Well there is no Value data box.
>
> So how am I going to get back to normal folder opening? This is a severe
> problem for me, as I'm constantly opening folders.
>
>
>
>
> KB 321379 article URL
> 2007-05-13 09:12:01 Doug_Sparks [Reply | View]
>
>
> Jean,
> I had a similar problem, but mine opened a new "Search" when I double
> clicked on any file folder icon. Once inside a folder, I went to "File
> types" tab, then highlighted "File Folder", and clicked "Advanced" button.
> "Open" was not in the list, so I clicked the "New" button; For "Action", I
> typed "Open", and for application to use for action I browsed to
> "Explorer.exe". I then set that action as the "Default" action, and voila!
> File Folders now open in Windows Explorer when double-clicked!
> YEEHAW!!
> KB 321379 article URL
> 2007-04-23 09:23:32 Help4Jean [Reply | View]
>
>
> Jean, see this site:
>
> http://windowsxp.mvps.org/searchwindow.htm
>
> Found by Dell Tech support who Googled "double click search."
>
> I then went to AllPrograms>Run, entered
>
> regsvr32 /i shell32.dll
>
> then got a dialog box that only let me click "OK", and problem is solved.
> Double-click once again opens folder, directory print function is still
> working.
>
> Thanks to Dell tech support in Edmonton, Alberta.
>
> Good luck.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: EXTREMELY TUSEFUL INFO - Printing Directory Listings Retroman Windows Vista General Discussion 0 11-21-2009 04:24 PM
Conflicting SFC results JohnDavid Windows Vista Performance 6 03-18-2008 02:00 AM
Re: Update Error 80070246 Robert Aldwinckle Windows Vista Performance 2 02-12-2008 09:15 PM
Re: Windows update error 80070246 Robert Aldwinckle Windows Vista Performance 7 12-31-2007 08:44 PM
Easy Transfer Error Message Jim Windows Vista Installation 11 09-22-2007 08:23 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59