Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 08:26:36 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Goodness! Is there NO Win utility to do "DIR /S/B C:\ZZZ\*.JPG > RESULT.TXT"?  (Read 14055 times)

tslim

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 211
    • View Profile
    • Donate to Member
What I want is just the "search result" on a folder-tree for certain type of files be printed (path+file or full filespec) to a text file! That simple!

WinXP's search can't be printed; I try (but never study in depth) and find that Total commander, xPlorer2 and D.Opus all just can't do exactly what I want????

I have to do it the DOS way, ah! :( ha! ha! ha! :)

t.s.lim
« Last Edit: January 05, 2007, 05:39:42 AM by tslim »

cthorpe

  • Discount Coordinator
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 728
  • c++thorpe
    • View Profile
    • Donate to Member
I have a batch file in my SendTo folder that does what you want:

@dir %1 /-p /o:gn > "%temp%\dir.txt"
start notepad "%temp%\dir.txt"

You can, of course, modify the dir command as you see fit.

Then in explorer, right click on the folder you want a list of, and send it to the batch file.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,713
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
I don't know much about AutoHotKey but I imagine this kind of thing wouldn't be too difficult to do with it. That is, it could run the command prompt, execute the code you want, and clean itself up with just a click or shortcut instead of having to type all the stuff in manually.


Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
My Seeker application (donationware) can handle the searches and provides four different reporting modes (one is a simple text report):
http://www.veign.com...load_app.asp?app=104

tslim

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 211
    • View Profile
    • Donate to Member
Hi Veign,

Thanks for the seeker link!

I just find out D.Opus actually can do what I want. After the search result is up, from the menu Edit->Copy Filenames->As full pathname (to the clipboard) then paste to notepad and save as a txt file.

I don't understand why the above is designed in that way? Why can't it simply offer a way to save search result to file in the "find panel" 's user interface or something like from right-click menu?

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
Why can't it simply offer a way to save search result to file in the "find panel" 's user interface or something like from right-click menu?

Check out the Reg Hacks on have on Viewing / Printing a folders contents.  Might be able to quickly modify for your needs:
http://www.veign.com/download_main.asp
(bottom of the page - Print Directory / View Directory)

KenR

  • Super
  • Blogger
  • Joined in 2006
  • ***
  • Posts: 826
    • View Profile
    • Donate to Member
Hey Veign,

Just FYI: I believe you could get what you wanted from Directory Opus using a "flat view" and appropriate filters.

Ken
Kenneth P. Reeder, Ph.D.
Clinical Psychologist
Jacksonville, North Carolina  28546

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 383
    • View Profile
    • defreitas.no
    • Donate to Member
Hi Veign,

Thanks for the seeker link!

I just find out D.Opus actually can do what I want. After the search result is up, from the menu Edit->Copy Filenames->As full pathname (to the clipboard) then paste to notepad and save as a txt file.

I don't understand why the above is designed in that way? Why can't it simply offer a way to save search result to file in the "find panel" 's user interface or something like from right-click menu?


You don't need to open notepad at all actually. Just do all the steps you currently take until the filenames/paths are copied to the clipboard. After that, just right-click a empty space in a lister and select paste (or press ctrl+v) and Dopus will create a new text file (by default named "Clipboard text.txt") with any text you might have on the clipboard.

Oh, and the same thing can be done with images as well :)
Registered nurse by day, hobby programmer by night.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,925
    • View Profile
    • Donate to Member
What I want is just the "search result" on a folder-tree for certain type of files be printed (path+file or full filespec) to a text file! That simple!

You might like LS - File List Generator (for Windows)

Quote
WinXP's search can't be printed; I try (but never study in depth) and find that Total commander, xPlorer2 and D.Opus all just can't do exactly what I want????

You need to look at Total Commander's addons.  Check DiskDir from the unofficial addons site http://www.totalcmd.net/

Quote
I have to do it the DOS way, ah! :( ha! ha! ha! :)

That's the way REAL MEN do it, isn't it?    8)


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
LS - File List Generator (for Windows)
« Reply #9 on: January 06, 2007, 06:16:15 PM »
Nice find rjbull!

Quote
LS - File List Generator (for Windows)

This tool collects the information about files and sub-folders under the specified folder or drive and generates the list in your preferred format.  You can individually specify your desired information types to include in the list. You can even customize the listing order and sorting priorities. The output format of the list can be chosen from txt, html, and csv (Excel's primitive file format).

This tool can collect the following information items: path, folder name, file name, extension, file size, save date. Then, the tool:
* Generates the list using only the items you select,
* Allows you to customize the listing order of the selected items,
* Sorts (rising/falling/no sort) multiple items while generating the list,
* Allows you to specify the file size unit from no units, bytes, KB, MB, GB,
* Allows you to specify the delimiter from space, tab, comma, slash, and no delimiter,
* Supports drag & drop operations when you specify the location of a folder,
* Includes an Abort button to stop the operation when a folder is too big or a machine is too slow.


tslim

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 211
    • View Profile
    • Donate to Member
How nice if LS lets user add a phase at the beginning or append a phase to end of every item it outputs.
I believe there could be a TC plugin for what I want to do, but isn't it a main feature that should be IN the TC program itself rather than an optional plugin?

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,925
    • View Profile
    • Donate to Member
How nice if LS lets user add a phase at the beginning or append a phase to end of every item it outputs.

I think you're asking for more than a directory lister there.  I'd go back to DOS, and use Horst Schaeffer's LMOD to pre-pend/append text:

LMOD 1.3 Filter (c) 2002 Horst Schaeffer
Syntax: LMOD options string_with_tokens
Options:
        /Ln[-m] line [range] to select (default: first non blank line)
        /L[n]*  all lines [starting n]
        /E      include empty input lines (default: no output)
        /S..    delimiters for word extraction, instead of default (,;=)
        /B..    as /S, but excluding blank space as delimiter
        /Nn     starting line number (for token [#]), default: /N001
Insert from source line (expression in square brackets):
 [p,l $n U|L Rn]  default []: complete line
        p,l     from position p, length l (default rest of line)
        $n      word number n ("!" for last word); optionally ┬▒offset
        $n:m    range of words by number (blank space will be inserted)
        U|L     convert to upper|lower case
        Rn      right aligned in output field of size n
Other tokens:
        [+]     insert CR+LF
        [-]     omit CR+LF at end of output
        [#]     line number (digits acc. to option, default:3)
        [=n]    tab to position n in output line
        [~n]    ASCII code n (decimal)
        [".."]  quoted char/string (use for redirection symbols)

Quote
I believe there could be a TC plugin for what I want to do, but isn't it a main feature that should be IN the TC program itself rather than an optional plugin?

You could always ask Christian for the feature...


@Mouser: I found LS from PriceLessWare, if I remember correctly.


tslim

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 211
    • View Profile
    • Donate to Member
In this case, I won't want to go back DOS unless I have no choice!

Ordinary DOS can't see NTFS drive (yes I am aware of NTFSdos, which allow so), does not handle long file name (again I am aware of DOS way to make it does), can't see drive bigger than 2 Gig and so on and so....

Even though DOS is still better (than Windows) way to go when you want to do something "task orientated" rather than "object orientated" (like my case), but most of us have given DOS up many years ago and now we have problem doing something which was nothing in the old DOS day.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
You can always open a console window under windows - command.com (DOS app) for win9x, cmd.exe (win32 console) for NT. And even NT, that isn't DOS-based like 9x is, still has DOS emulation.

I really love xplorer^2 since it allows me to write shell commands in the location bar, that run in the context of the current folder. If I'm in [/b]d:\src\proj\fsekrit[/b], I type $dir *.cpp /s /b in the location bar, and up pops a window with the files. - and it's not even a console window, since xplorer^2 redirects input/output and handles it itself :)

x2_files.pngGoodness! Is there NO Win utility to do "DIR /S/B C:\ZZZ\*.JPG > RESULT.TXT"?x2_result.pngGoodness! Is there NO Win utility to do "DIR /S/B C:\ZZZ\*.JPG > RESULT.TXT"?
- carpe noctem

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 383
    • View Profile
    • defreitas.no
    • Donate to Member
Ok, so I played around a little with Dopus, and made a button for you that should take care of this. Just copy the code below to your clipboard, open a lister, go to tools -> customize and right-click on any toolbar where you'd like the button to be and choose paste.
When using it, you'll first be asked what filename filters you'd like (e.g.: *.avi), and then present you with a "save-as..." dialogue. Simple & easy :)

<?xml version="1.0" encoding="UTF-8"?>
<button display="both" effect="gray">
<guid>{42389041-894C-478A-926F-ACD0E6033C15}</guid>
<label>Print list of files in directory</label>
<tip>Print the name of files in the current directory, and any subdirectories, to a file of your choosing</tip>
<icon1>122</icon1>
<function type="batch">
<instruction>runmode hide</instruction>
<instruction>dir /b /s {dlgstring|Enter filename filter (e.g.: *.avi)} &gt; {dlgsave|Save results} </instruction>
</function>
</button>
Registered nurse by day, hobby programmer by night.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,925
    • View Profile
    • Donate to Member
In this case, I won't want to go back DOS unless I have no choice!

;)

Quote
Ordinary DOS can't see NTFS drive (yes I am aware of NTFSdos, which allow so), does not handle long file name (again I am aware of DOS way to make it does), can't see drive bigger than 2 Gig and so on and so....

Even though DOS is still better (than Windows) way to go when you want to do something "task orientated" rather than "object orientated"

I don't know about NTFS.  Here's part of the help file for Charles Dye's file finder LOCATE:

Quote

/L      Display Windows 95 Long filenames.  This option will only work under
        an operating system which provides the long-name API.  It will work
   in a DOS box under Windows 95, but not in Win95 DOS mode (MS-DOS 7.x.)
   It will work with DR-DOS only if you have Caldera's long-filename TSR
   installed.

   This option only affects the display!  Locate still searches for files
   using the 8.3 DOS filenames.  If you want to search for a specific long
   filename, I recommend that you type only the first five letters, followed
   by an asterisk:  LOCATE BLUER* /L to find a file named "Blue Rivets.bmp".
   (This file probably has a short filename of BLUERI~1.BMP, so BLUER* will
   match it.)  To find all the short "aliases" which refer to non-8.3
   filenames, try LOCATE *~*


/O:"format"    Macro Output.  For each item found, Locate will print out the
               string between quotes exactly as typed, except that certain
   macros beginning with an ampersand (&) will be replaced.

   macro  what it displays           width  example

   &F     fully qualified filename      -   C:\DOS\DISKCOPY.COM
   &D     directory name, canonical     -   C:\DOS
   &P     directory name with \         -   C:\DOS\
   &N     filename                      -   DISKCOPY.COM
   &R     filename without extension    -   DISKCOPY
   &X     extension only                -   COM
   &S     filespec without drive        -   \DOS\DISKCOPY.COM
   &L     drive letter                  -   C:
   &G     copy target, no drive         -   \DOS
   &J     right-padded with spaces     13   win.com     
   &A     attributes, as for ATTRIB    11   +A -S -H -R
   &B     attribute bits                5   A....
   &W     Windows 95 long filename      -   "C:\Directory\Long Filename.html"
   &Z     long filename only, no path   -   "Long Filename.html"
   &Y     long directory name with \    -   "C:\Directory\"
   &V     long filename base            -   Long Filename
   &K     long filename extension       -   html
   &1     date stamp, local format     11   May 31 1994
   &2     time stamp, local format      9    6:22:00a
   &3     file size                    10   13335
   &4     day of the week               3   Tue
   &5     pretty file size             13   13,335
   &6     file size in KB or MB         9   13.02 K
   &7     date stamp, ISO format       10   1994-05-31
   &8     time stamp, 24-hour format    8   06:22:00
   &U     show summary info at end      -

   &T  terminate line    &&  ampersand     &E  escape    &Q  quote mark
   &I  five-space tab    &C  conditional   &H  header    &# or &@  index


I could maybe wish Charles had updated LOCATE a little more for Windows, but it's an extremely useful tool as it is (and freeware).


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
rjbull: unless the tool is very ugly and reads the disk directly (which I doubt), it should work under NT, and on NTFS as well. "This option will only work under an operating system which provides the long-name API." - this sounds a lot like it will work :)
- carpe noctem

tslim

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 211
    • View Profile
    • Donate to Member
Thank you to all who are trying to help!

If you read the "subject" of my initial post, you should realize that I already got what I want with the "DIR" in a DOSBOX (of course)

I started the thread just to express my feel of missing power in today's O/S (when task orientated matters are involved)

In the DOS day, things like DIR and RENAME are very easy and to get their function extended, one just need to add few more parameters. They are just commands of the DOS (not even a stand-alone utility). But look at Windows utility nowaday, we need a "Multi-Rename" tool just to "rename" easily... If it is not through Rjbull's recommendation (the LS) I don't even know where to get a Windows utility that can do the DIR thing (as in the title).

I am not saying the trick played by D.Opus and xPlorer2 are bad one, they are simply shell to DOS function and is DOS dependent. In a way, new guys who are born after the DOS day, do you want them to learn DOS again just to be able to do the DIR thing?


Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,888
    • View Profile
    • Donate to Member
Printfolder
http://no-nonsense-s...ftware.com/freeware/
printfolder_grab.gifGoodness! Is there NO Win utility to do "DIR /S/B C:\ZZZ\*.JPG > RESULT.TXT"?

Karen's Directory Printer
http://www.karenware...ertools/ptdirprn.asp
ptdirprn.gifGoodness! Is there NO Win utility to do "DIR /S/B C:\ZZZ\*.JPG > RESULT.TXT"?

These can both be gotten from a right-click, is this what you need?


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Quote from: tslim
I am not saying the trick played by D.Opus and xPlorer2 are bad one, they are simply shell to DOS function and is DOS dependent. In a way, new guys who are born after the DOS day, do you want them to learn DOS again just to be able to do the DIR thing?
Shell, not DOS ;)

But yeah, I guess you're right apart from that. MS designs for the majority of users, the majority of users probably don't need file listings like this... and 3rd-party tools can always (and have been) written :)
- carpe noctem

GHammer

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 34
    • View Profile
    • Donate to Member
If you're using Directory Opus, try Tools -> Print Folder
Pretty flexible.

wyrwolf

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 38
  • It is what it is.
    • View Profile
    • banner page
    • Donate to Member
I've been trying every different small app for this I run across, and so far Karen's app keeps impressing me more and more
It is what it is.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,925
    • View Profile
    • Donate to Member
rjbull: unless the tool is very ugly and reads the disk directly (which I doubt), it should work under NT, and on NTFS as well. "This option will only work under an operating system which provides the long-name API." - this sounds a lot like it will work :)

f0dder,

It works fine under Win2K, and the macros mean you can make batch files on the fly, or directly execute commands on the found files, with or without asking permission each time.  Either Locate's macros or use of Horst Schaeffer's LMOD allows easy automated pre-pending/appending of text to lists, so tasks can be automated easily.

Once upon a time, I even wondered if some kind person might make a WinGUI shell for it  ;)


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Once upon a time, I even wondered if some kind person might make a WinGUI shell for it  ;)
* f0dder looks around for Skrommel
:P
- carpe noctem

bobdec

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10
    • View Profile
    • Donate to Member
Microsoft has a AddPrint Directory program for printing folder contents in XP
http://support.micro...oft.com/?kbid=321379
Bob