Search found 7 matches

by testingbatch
15 Mar 2019 05:36
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 6674

Re: Find a String

I found a nice way to get complete this task. I just transform the document in just one line and check if there was some update today, if yes, the program grep all the lines and copy to a new txt file and with the for loop is going to transform the multiple string in just one. for /f "usebackqdelims...
by testingbatch
08 Mar 2019 10:23
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 6674

Re: Find a String

You need to show us a full example of the log file. That's why i asked if using a For would be a better option. You never asked this in your original question. My text.log has about 9k lines, and example: 01-02-2019 16:54 The following request has started: Request type: ScanRequest Request ID: 10 A...
by testingbatch
08 Mar 2019 09:54
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 6674

Re: Find a String

aGerman wrote:
08 Mar 2019 09:11
I still don't get what your goal is. Do you want to filter out these four lines? Or do you want to extract the ID number out of your log file?
Just to extract the four lines.
by testingbatch
08 Mar 2019 08:42
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 6674

Re: Find a String

So as I understood you need to match the whole line where the number may differ. Untested: type "logs.txt"|findstr /rc:"The following request has finished: Request type: ScanRequestRequest ID: [0-9][0-9]*Assessee name: Teste\.Zip" If you are sure that there are no spaces in front or behind the line...
by testingbatch
08 Mar 2019 03:41
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 6674

Find a String

Hello everyone, thanks for the help on my first topic here, it was really helpful. So i have this string on my logs.txt and when we have a build on our websites it will put a new string on the txt file. String example: The following request has finished: Request type: ScanRequestRequest ID: 11Assess...
by testingbatch
20 Feb 2019 03:20
Forum: DOS Batch Forum
Topic: was unexpected at this time
Replies: 3
Views: 5761

Re: was unexpected at this time

Remove the spaces in the SET command for the JOBID variable. If you have a space on the left of the equals symbol it becomes part of the variable name. If you have a space on the right of the equals symbol it becomes part of the value. Hello Squashman, and thanks for the feedback. I did what you sa...
by testingbatch
19 Feb 2019 09:25
Forum: DOS Batch Forum
Topic: was unexpected at this time
Replies: 3
Views: 5761

was unexpected at this time

call "...\server.bat" start ifa call "...\jar.exe" -cvfM "CDO.zip" "%1" set jobid = "...\curl.exe" -X POST -i -T "CDO.zip" "http://localhost:9080/rest/ifa/v1/triaged-assessments" for /f "tokens=*" %%a in ('%jobid% ^|findstr ".*-.*-.*-.*"') do set "output=%%a" echo %output% call "...\curl.exe" -X GE...