Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8568077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:01:33+00:00 2026-06-11T18:01:33+00:00

I have a log file with output of command in my batch file. I

  • 0

I have a log file with output of command in my batch file.
I want to review on this file and check if there were an error.
this is the row of this file with error:

9/20/2012 7:22:34 AM [Error] Error occured while reloading resource table: VALUE is duplicated

how I can to check it?
I try the following:

for /f "tokens=4 %%x in (%TMPLog%) do 
    if "%%x"=="ERROR" SET err=TRUE

but it doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:01:34+00:00Added an answer on June 11, 2026 at 6:01 pm

    You can have that much easier:

    findstr /l /c:"[Error]" "%TMPLog%" >nul 2>&1 && set err=1
    

    Another random note: For boolean variables I tend to have the pattern of the variable being defined when it’s true and not defined when it’s false. Then you can simply check it with if defined err which reduces errors from mistyping the comparison value and also works properly in blocks without delayed expansion (another common source of mistakes). Just if you were wondering why I used set err=1 instead of set err=TRUE.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a transaction log file in CSV format that I want use to
I have a huge log file where there are about 15 million lines. I
i have command ccv this will output as below Your Project : gdgdd750V64OG ,
I have a log file which has a format of this kind: DATE-TIME ###
I have a log file which contains a number of error lines, such as:
I have a log file that I'm trying to append data to the end
I have a log file that I am reading to a string public static
I have a log file in SqlServer that stores the time an application started,
I have a log file containing statistics from different servers. I am separating the
Lets say we have a log file (preferably a txt file) available in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.