Print Tree/File List

Support for xplorer² free lite version

Moderators: fgagnon, nikos, Site Mods

User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Yes, I use the Ctrl+P because of its vesatility.
So if there's an either/or choice, that (as opposed to Alt+C) is the style I would want to see with a direct print option.
(It looks like Ctrl+Alt+P is an unassigned shortcut -- how about using that for the requested print columns function? )

& I confess that when I checked the workings of Alt+C, that it did not register that fullpathnames were copied. I guess I'm so used to them being there that I did not see them. :oops:
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

being an advocate of the paper-less office and tree-hugger, i consider the lack of direct printing as my little subversive plot protecting the amazon rainforest :)
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

There are still many things which are more efficiently done with pencil (or pen) & paper -- among these are working with check-lists & often marking/revising documents, where it is quicker to hand-annotate as you go & easier to see what's been addressed & what is remaining at a glance.
(Not to mention that printed lists are a human readable record accessible without turning on the machine.)
hpp3
Member
Member
Posts: 51
Joined: 2004 Jun 04, 15:36

Post by hpp3 »

hpp3, if you just want the names, either do the alt+C as fred said, or if you don't want the pathnames switch to list view mode first (View | pane style) and then use ctrl+P
Thanks Nikos, I'll try that. I am usually in detail mode, so yeah I got pathnames.
JRz: as for your script,
Note that the same restriction of having at least Windows 2000 applies here too.
I am on an NT machine, so do I need different syntax for the 'for' command, or will it simply not work?(sorry, I've not yet had opportunity to test it)
I would vote to add hpp3's suggestion to the list of future features.
It is a bit conforting to see I'm not alone in finding such a thing useful. Really it's because there have been times when doing printing or having to hand-compare things, I need a piece of paper in front of me upon which to take notes, check things off, etc. I sympathize with the desire to conserve paper but it's no more paper than I would use if I were to simply jot down the file names by hand, and sometimes the list is quite long:)
-hpp3
john2222
Member
Member
Posts: 10
Joined: 2004 Aug 01, 22:26

Post by john2222 »

Not to take away anything from the great capabilities of xplorer2, but one of the most famous and popular director print programs is from Karenware.
http://www.karenware.com/powertools/powertools.asp

(free for personal use). I am not associated with Karen in any way, but she has an excellent site and excellent newsletter and excellent programs.
hpp3
Member
Member
Posts: 51
Joined: 2004 Jun 04, 15:36

Post by hpp3 »

Well now, ain't that a peach!
Thanks john2222!
Relax Nikos, this one cuts it good.
Thanks all again.
-hpp3
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

hpp3 wrote:[...]JRz: as for your script,
Note that the same restriction of having at least Windows 2000 applies here too.
I am on an NT machine, so do I need different syntax for the 'for' command, or will it simply not work?(sorry, I've not yet had opportunity to test it)
On NT 4.0 this syntax won't work, because the keyword "usebackq" is not supported by the 'for' command in that windows version. Sorry :(

(however, there are ways to circumvent that drawback, for instance by using the Cygwin tools I mentioned earlier; but I'll stop here, to keep Nikos from feeling light in the head ;) )
Dumb questions are the ones that are never asked :turn:
hpp3
Member
Member
Posts: 51
Joined: 2004 Jun 04, 15:36

one final word

Post by hpp3 »

I found this on a "Tips and Tricks" site which is quite simple and uses some of the techniques mentioned before. Still not as nice as Karen's, but useful and fast nonetheless. First make a batch file named "PrintDir" (or something even more ingenious) and stick it in C:\ (or somewhere appropriate):

Code: Select all

@echo off
dir %1 /-p /o:gn > "%temp%\Listing"
start /w notepad /p "%temp%\Listing"
del "%temp%\Listing"
exit
Then make a new reg key:

Code: Select all

HKEY_CLASSES_ROOT\Directory\shell\Print Directory\command
with the following value:

Code: Select all

c:\printdir.bat %1\
Now you can right click on any directory and select the "Print Directory" command and it will print a list of all folder names inside. To print a list of files also add "/s" after the "dir" command in the batch file. In fact, look at the DIR help page for even more options, or use Editor2 instead of notepad, or.... :oops: Oh man, I gotta stop.
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

nice tip/trick, hpp3 :)
Thanks !
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Re: one final word

Post by JRz »

hpp3 wrote:I found this on a "Tips and Tricks" site which is quite simple and uses some of the techniques mentioned before. Still not as nice as Karen's, but useful and fast nonetheless. First make a batch file named "PrintDir" (or something even more ingenious) and stick it in C:\ (or somewhere appropriate):

Code: Select all

@echo off
dir %1 /-p /o:gn > "%temp%\Listing"
start /w notepad /p "%temp%\Listing"
del "%temp%\Listing"
exit
Then make a new reg key:

Code: Select all

HKEY_CLASSES_ROOT\Directory\shell\Print Directory\command
with the following value:

Code: Select all

c:\printdir.bat %1\
Now you can right click on any directory and select the "Print Directory" command and it will print a list of all folder names inside. To print a list of files also add "/s" after the "dir" command in the batch file. In fact, look at the DIR help page for even more options, or use Editor2 instead of notepad, or.... :oops: Oh man, I gotta stop.
A few comments (I can't help myself ;) )

@dir %1 /-p /o:gn

this command will not only show folders, but files aswell (ordered by folders first and then files, in alfabetical order)!
The '/-p' switch is optional, since the default is that output is not 'paginated' (the /p switch enables this and /-p should disable it, but I found that on my Dutch Windows XP Pro SP2 /-p also paginates output, giving you the same 'press any key to continue...' message as /p would :? )

To only show folders, sorted by name, use this in stead

Code: Select all

dir %1 /ad /o:n 
The /o:gn could be used too, but since there are no files to display, it doesn't make any difference if you use /o:gn or /o:n :)

@To print a list of files also add "/s" after the "dir" command in the batch file

This is not true, since the /s switch will recurse into subfolders, showing the contents of all subfolders and their children too. Used like in the example it will show all files and folders in the hierarchy from the specified '%1' folder (not hidden files and folders though).

To show all folders in the hierarchy (including hidden!; the /ad switch shows all folders including hidden!), use this

Code: Select all

dir %1 /ad /o:n /s
If you want to exclude the hidden folders, use this

Code: Select all

dir %1 /ad-h /o:n /s
And finally, as a topping on the cake, if you want only the folder names listed, without all the other output about how much there were found (the headers and footers of the 'dir' command) and without the date time info in front of it, use the following command

Code: Select all

dir %1 /b /ad /o:n /s
Enjoy! 8)
Dumb questions are the ones that are never asked :turn:
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

... and for an even more complete, short summary of all the "dir" commandline swiitches, available even off-line, just type $dir /? in the xplorer² addressbar. ;)
J44xm
Member
Member
Posts: 22
Joined: 2004 Apr 23, 02:19

Post by J44xm »

Wow, guys -- I haven't been this revved up about DOS in some time. :)
hpp3
Member
Member
Posts: 51
Joined: 2004 Jun 04, 15:36

Post by hpp3 »

This just in...

Code: Select all

@echo off
tree /F /A %1 > "%temp%\dirlist"
start /w notepad /p "%temp%\dirlist"
del "%temp%\dirlist"
exit
call it "Dirlist.bat" or something, and save it to your c:\ dir then make a .reg file:

Code: Select all

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\Dirlist\command]
@="C:\\dirlist.bat %1\\"
(you could also replace "C:\" with a path to wherever you really want to put the .bat file, and remember to double the slashes...)
and right-click Merge.

Now, right-click on any directory and select "Dirlist"

The hits, they just keep a-comin'