Results 1 to 8 of 8

Thread: Search files containing text in windows 7

  1. #1
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default Search files containing text in windows 7

    I want to search a folder full of txt files for a file that contains the word 'bla'.
    How the hell do I so this?
    I have the folder indexed and txt file type is selected and 'Index Properties and File Contents' is checked under the Indexing Options settings. So WTF....

    I'm in the folder and type the word 'the' in the box and I get no results, and I know I've used the word the many times in these .txt files. Could I get some help, or someone to suggest an alternate program to search files containing terms?

  2. #2
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    http://answers.microsoft.com/en-us/w...2-bb920efa4f30

    I always use Notepad++, though. Works pretty good too
    Hup Holland Hup!

  3. #3
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Got Git installed? If so you also have grep and then it's easy Run this from git bash:
    http://www.tonyspencer.com/2005/10/1...-for-a-string/
    I made a new script, check it out!.

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    I've sen that, no idea how to get to :
    http://skeene.net/answers/searchOptions.png
    When I right click the folder>Properties there is no 'search' tab.

  5. #5
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    It's not in the rightclick menu, but rather where you also can enable viewing hidden files etc. It's the button on the top left ("Organize"?).
    Hup Holland Hup!

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    It's not in the rightclick menu, but rather where you also can enable viewing hidden files etc. It's the button on the top left ("Organize"?).
    Wow how wierd... should be in properties I say.
    Anyways, I did that (in fact my settings were already like the image (I have 'Always search file names and contents' checked, is that right?)

    Sorry but this is FASRAKING stupid, why is it so difficult to do this... windows XP did it just fine without having to edit or change any settings....

    I just manually Ctrl+Fed a bunch of notepads and found what I wanted, but this is still very bothersome WTFFFFFF

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Code:
    grep -e $PATTERN ./*
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  8. #8
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    I made a script for this in Simba, but I only designed it to search through folders and sub-folders (not sub-sub folders and so on)

    Here:
    Simba Code:
    // Made by Zyt3x
    const
      DEBUG     = FALSE;

      DIR       = IncludePath + 'SRL\SRL\';
      SearchStr = 'Pos(''k''';
      EXT       = 'scar';  // Extension. (CompileSRL.scar, Setup.simba)

    var
      Directories, S, S2, Files, AllFiles : TStringArray;
      H, Hi, I, Int, F : Integer;

    begin
      ClearDebug;
      Directories := GetDirectories(DIR);
      H := High(Directories);
      SetArrayLength(Directories, H+2);
      WriteLn(DIR);
      for I := 0 to H+1 do
      begin
        if Length(Directories[I]) <> 0 then
          if Directories[I][Length(Directories[I])] <> '\' then Directories[I] := Directories[I] + '\';
        if DEBUG then
          WriteLn(DIR + Directories[I]);
        Files := GetFiles(DIR + Directories[I], EXT);
        Hi := High(Files);
        for Int := 0 to Hi do
        begin
          if DEBUG then
            WriteLn(' - ' + DIR + Directories[I] + Files[Int]);
          if FileExists(DIR + Directories[I] + Files[Int]) then
          begin
            F := OpenFile(DIR + Directories[I] + Files[Int], False);
            SetArrayLength(S, Length(S)+1);
            SetArrayLength(AllFiles, Length(AllFiles)+1);
            ReadFileString(F, S[High(S)], FileSize(F));
            AllFiles[High(AllFiles)] := DIR + Directories[I] + Files[Int];
            CloseFile(F);
          end;
        end;
      end;
      H := High(S);
      WriteLn('');
      WriteLn(SearchStr + ' found in:');
      for I := 0 to H do
      begin
        if Pos(LowerCase(SearchStr), LowerCase(S[I])) <> 0 then
          WriteLn(' +  ' + AllFiles[I]);
      end;
    end.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •