Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Extract file names from Disk search to new doc

Expand Messages
  • Jane Sedgewick
    Perhaps I m missing something, but if you go to the command prompt, and type in for example: findstr searchtext *.txt foundThese.txt all files with txt
    Message 1 of 31 , Jul 31, 2007
    • 0 Attachment
      Perhaps I'm missing something, but if you go to the command prompt, and type in for example:

      findstr "searchtext" *.txt > foundThese.txt

      all files with txt extension will be searched for the searchtext, and all filenames in which it is found will be sent to the file foundthese.txt which, when opened, lists the filenames and context of the found text.

      If you want to search the current directory and all subdirectories use a /s toggle like this

      findstr /s "searchtext" *.txt > foundThese.txt

      You put whatever you want for the searched text ( e.g. "searchtext"),
      what files do you want to search (e.g.*.txt)
      and the file you want the output stored (e.g. foundThese.txt)
      The > symbol redirects the search results into the file specified(it creates the file, puts the output in it and closes it automatically)

      It's done in a wink.

      Perl can do it in one line also, but the command prompt is available to everybody, whereas not everyone has Perl.

      Cheers,
      Jane




      Hugo Paulissen <hugopaulissen@...> wrote:
      > It was also suggested that Windows
      > search/find be used , but that takes a full day to run ONCE on my
      > computer, I have a 1 gig SDRam, running Vista Home. and the
      SEARCH in
      > windows is slower than molasses at 35 below.
      >
      > The NoteTab Disc search (With screen update OFF) is incredibly
      fast in
      > comparison.
      >
      > Using windows to do it under their system is worse than looking
      manually...
      >

      Jeff,

      More then five years ago I tried to call findstr to work on my (then
      new) XP-system, I advised Jody to look into this option, and never
      used it myself.

      I do not know if Vista still has the findstr-option, but it could be
      that the following clip may be a starting point. I do think that it
      is fast enough, but you are the only one to judge that...

      The following is based on the example I once sent to the scriptlist.
      I do not have too much time for clips nowadays. I've removed the
      negate part of the find in this example (you could find files with
      certain words and exclude all files with other words).

      ^!Menu File/New
      ^!GoTo ^?[What do you want to do?==Get help on
      FINDSTR^=INFO|_Search^=FINDSTR]
      :INFO
      ^$GetOutput("findstr /?")$
      ^!GoTo EXIT
      :FINDSTR
      ^!Set %find%=^?[Find=string of characters]
      ^!Set %where%=^?[(T=D)Where?=C:\Documents and Settings]
      ^!Set %ext%=.^?[Extension=_txt|htm|html]
      ^!Set %found%=^$GetDosOutput("findstr /S /M /C:"^%find%" "^%where%*^%
      ext%"")$
      ^!IfTrue ^$IsEmpty(^%found%)$ NOTFOUND
      ^%found%
      ^!Save AS list^%find%.txt
      ^!Goto END
      :NOTFOUND
      ^!INFO As you have noticed, ^%find% could not be found...

      Hugo






      ---------------------------------
      Boardwalk for $500? In 2007? Ha!
      Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

      [Non-text portions of this message have been removed]
    • Elias Borisov
      Hi, Has anybody tried PrintFolder? Easily Print Files from any Folder (Free Software) PrintFolder is a handy utility to print or save a list of files located
      Message 31 of 31 , Aug 2, 2007
      • 0 Attachment
        Hi,

        Has anybody tried PrintFolder?
        "Easily Print Files from any Folder"
        (Free Software)

        PrintFolder is a handy utility to print or save a list of files located in any folder. Right-click any folder in Windows Explorer and select "PrintFolder" in the popup menu.


        elias


        Jane Sedgewick <jane_sedgewick@...> wrote:
        Perhaps I'm missing something, but if you go to the command prompt, and type in for example:

        findstr "searchtext" *.txt > foundThese.txt

        all files with txt extension will be searched for the searchtext, and all filenames in which it is found will be sent to the file foundthese.txt which, when opened, lists the filenames and context of the found text.

        If you want to search the current directory and all subdirectories use a /s toggle like this

        findstr /s "searchtext" *.txt > foundThese.txt

        You put whatever you want for the searched text ( e.g. "searchtext"),
        what files do you want to search (e.g.*.txt)
        and the file you want the output stored (e.g. foundThese.txt)
        The > symbol redirects the search results into the file specified(it creates the file, puts the output in it and closes it automatically)

        It's done in a wink.

        Perl can do it in one line also, but the command prompt is available to everybody, whereas not everyone has Perl.

        Cheers,
        Jane




        Hugo Paulissen <hugopaulissen@...> wrote:
        > It was also suggested that Windows
        > search/find be used , but that takes a full day to run ONCE on my
        > computer, I have a 1 gig SDRam, running Vista Home. and the
        SEARCH in
        > windows is slower than molasses at 35 below.
        >
        > The NoteTab Disc search (With screen update OFF) is incredibly
        fast in
        > comparison.
        >
        > Using windows to do it under their system is worse than looking
        manually...
        >

        Jeff,

        More then five years ago I tried to call findstr to work on my (then
        new) XP-system, I advised Jody to look into this option, and never
        used it myself.

        I do not know if Vista still has the findstr-option, but it could be
        that the following clip may be a starting point. I do think that it
        is fast enough, but you are the only one to judge that...

        The following is based on the example I once sent to the scriptlist.
        I do not have too much time for clips nowadays. I've removed the
        negate part of the find in this example (you could find files with
        certain words and exclude all files with other words).

        ^!Menu File/New
        ^!GoTo ^?[What do you want to do?==Get help on
        FINDSTR^=INFO|_Search^=FINDSTR]
        :INFO
        ^$GetOutput("findstr /?")$
        ^!GoTo EXIT
        :FINDSTR
        ^!Set %find%=^?[Find=string of characters]
        ^!Set %where%=^?[(T=D)Where?=C:\Documents and Settings]
        ^!Set %ext%=.^?[Extension=_txt|htm|html]
        ^!Set %found%=^$GetDosOutput("findstr /S /M /C:"^%find%" "^%where%*^%
        ext%"")$
        ^!IfTrue ^$IsEmpty(^%found%)$ NOTFOUND
        ^%found%
        ^!Save AS list^%find%.txt
        ^!Goto END
        :NOTFOUND
        ^!INFO As you have noticed, ^%find% could not be found...

        Hugo

        ---------------------------------
        Boardwalk for $500? In 2007? Ha!
        Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

        [Non-text portions of this message have been removed]






        ---------------------------------
        Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us.

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.