|
Answer» 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....Some1 pls help me out with this batch code pls,....
I am really in need .......
Thank you in advance.....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" Post your question ONCE and in your own thread.And stop PM'ing people for answers Please...
Quote from: patio on May 28, 2014, 12:08:51 PM And stop PM'ing people for answers Please...
+1 or maybe that is +2 or +3 already.Starting to sound alot more like Homework to me..... 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..Hi Foxi,
The code that you suggested DOESNT work . Its not copying anything, Any other suggestions ?
Thanks in advance.Place pause as the last line.
Are there any messages on the screen? I tried as yo you said Foxi and also i get many lines as mentioned below on the screen ...
FINDSTR: Cannot open %
You pasted it into a CMD window, right?
Quote from: Venkat on May 29, 2014, 04:06:48 AMI 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.He's DONE his own editing....
Please post what you have so far...
Quote from: patio on May 29, 2014, 07:26:47 AMHe's done his own editing....
Please post what you have so far...
Another +1 for you!
|