Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: To search and send "Interpretation (Interpret) Passed" Exactly from Html files  (Read 14257 times)

0 Members and 1 Guest are viewing this topic.

Venkat

    Topic Starter


    Rookie

    • Experience: Experienced
    • OS: Windows 7
    Hi Friends,
     I want a batch code to  search a string exactly like "Interpretation (Interpret) Passed" from a set of HTML files locatind in folders and subfolders and send the files which contain that string to another folder. similarly i wanna even search "Interpretation (Interpret) Failed" and "Interpretation (Interpret) Incomplete" from html files and send to specified folder.
    i tried with the code mentioned below:

    @echo OFF
    for /f "delims=" %%f in ('findstr /S/M /C:"Interpretation (Interpret) Failed" *.html') do copy "%%f" C:\\failedreports
    for /f "delims=" %%f in ('findstr /S/M /C:"Interpretation (Interpret) Incomplete" *.html') do copy "%%f" C:\incompletereports
    for /f "delims=" %%f in ('findstr /S/M "Interpretation (Interpret) Passed" *.html') do copy "%%f" C:\Passed

    But this code doesn't work .... Any Help Pls????????????????? ::) ::) :-\ ??? ??? ???
     Its very urgent Pls help me out :(
    Thanks in advance....

    Venkat

      Topic Starter


      Rookie

      • Experience: Experienced
      • OS: Windows 7
      Some1 pls help me out with this batch code pls,....

      I am really in need .......

      Thank you in advance.....

      foxidrive



        Specialist
      • Thanked: 268
      • Experience: Experienced
      • OS: Windows 8
      When you request some help in future - post once in a new thread, don't post PMs asking for help, and when you do get some help - come back and let the people here know if it worked or not.  That'd be good.


      Code: [Select]
      @echo off
      for /r %%a in (*.html) do findstr /C:"Interpretation (Interpret) Failed"     "%%a" >nul && copy "%%a" "C:\failedreports"
      for /r %%a in (*.html) do findstr /C:"Interpretation (Interpret) Incomplete" "%%a" >nul && copy "%%a" "C:\incompletereports"
      for /r %%a in (*.html) do findstr /C:"Interpretation (Interpret) Passed"     "%%a" >nul && copy "%%a" "C:\Passed"

      Allan

      • Moderator

      • Mastermind
      • Thanked: 1260
      • Experience: Guru
      • OS: Windows 10
      Post your question ONCE and in your own thread.

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      And stop PM'ing people for answers Please...
      " Anyone who goes to a psychiatrist should have his head examined. "

      Squashman



        Specialist
      • Thanked: 134
      • Experience: Experienced
      • OS: Other
      And stop PM'ing people for answers Please...
      +1
      or maybe that is +2 or +3 already.

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Starting to sound alot more like Homework to me..... ::)
      " Anyone who goes to a psychiatrist should have his head examined. "

      Venkat

        Topic Starter


        Rookie

        • Experience: Experienced
        • OS: Windows 7
        Sorry all for the troble and thanks for the help... will let you people no if its working in a while since my server is down..
        « Last Edit: May 28, 2014, 11:23:40 PM by Venkat »

        Venkat

          Topic Starter


          Rookie

          • Experience: Experienced
          • OS: Windows 7
          Hi Foxi,

          The code that you suggested doesnt work . Its not copying anything, Any other suggestions ?

          Thanks in advance.

          foxidrive



            Specialist
          • Thanked: 268
          • Experience: Experienced
          • OS: Windows 8
          Place pause as the last line.

          Are there any messages on the screen?

          Venkat

            Topic Starter


            Rookie

            • Experience: Experienced
            • OS: Windows 7
            I tried as yo you said Foxi and also i get  many lines as mentioned below on the screen ...

            FINDSTR: Cannot open %



            foxidrive



              Specialist
            • Thanked: 268
            • Experience: Experienced
            • OS: Windows 8
            You pasted it into a cmd window, right?

            Squashman



              Specialist
            • Thanked: 134
            • Experience: Experienced
            • OS: Other
            I tried as yo you said Foxi and also i get  many lines as mentioned below on the screen ...

            FINDSTR: Cannot open %
            I don't get that error when I run it.

            patio

            • Moderator


            • Genius
            • Maud' Dib
            • Thanked: 1769
              • Yes
            • Experience: Beginner
            • OS: Windows 7
            He's done his own editing....

            Please post what you have so far...
            " Anyone who goes to a psychiatrist should have his head examined. "

            Squashman



              Specialist
            • Thanked: 134
            • Experience: Experienced
            • OS: Other
            He's done his own editing....

            Please post what you have so far...
            Another +1 for you!