Active 1 year, 5 months ago. Viewed 42k times. FyreeW FyreeW 1 1 gold badge 4 4 silver badges 15 15 bronze badges. I just saw that this issue is dealt with in this answer anyway Add a comment. Active Oldest Votes. Magoo Magoo Sorry- my crystal ball must be on the blink again. These commands must be within the for loop. Alright, it works now. Is there a way to do it without it printing out the code?
First line of a batch file is normally echo off which suppresses the code display. Magoo u should use findstr instead of find — Behrouz. Show 4 more comments. See my edit : I accidently did not use delayed expansion for string although I described it This is important! For example "SearchText" not SearchText. Rachel Nichols Rachel Nichols 11 2 2 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. The Overflow Blog. Archived Forums. The Official Scripting Guys Forum! If your answer is "yes," you know what to do. Dive in and help somebody! If your answer is "no," welcome to our fun little world!
We'd recommend that you first head over to the Script Center, get your feet wet, and then come back to either ask or answer questions. We can't be everywhere at once we know—shocking! The Microsoft Scripting Guys 3 1. Sign in to vote. Appreciate for your kind help. Thank you. Thursday, June 20, AM. Thursday, June 20, PM. You need to maintain a "state", i. That aside, use PowerShell if you can. Appreciate it. Due to some requirements, we need to stick to batch scripting.
Thought batch script should be able to perform this kind of string manipulation? Well, I guess I need to keep searching for the answer : Thanks. Like I said - just thoughts. Hi Mike, No problem. Thanks for the help. Will take a look at those links. Have a nice day :. Have a nice day : Cheers, you too, hope it works out. If you run into trouble, post your code and your errors and we'll go from there. The code works as expected which is what I've been looking for. However, got a small issue here, for the match string, possible to use a wildcard for searching?
Monday, June 24, AM. That's a bit odd. Sorry, I got it wrong. When I tried again, the script is working OK with a smaller log data. I've let the script running for more than 5 hours and it's not finished. Is there a way to improve the script? Monday, June 24, PM.
I also find findstr takes a lot longer to run, probably because of the many features it supports such as regex. Unfortunately I don't see there's anything a batch file can provide to improve the performance.
0コメント