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 7930503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:26:51+00:00 2026-06-03T20:26:51+00:00

What does OK = N do in a Windows Batch File? For example when

  • 0

What does OK = N do in a Windows Batch File?
For example when you see files with the following at the beginning:

setlocal
OK=N

Thanks in advance… 🙂

  • 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-03T20:26:53+00:00Added an answer on June 3, 2026 at 8:26 pm

    That doesn’t look valid to me at all.

    Assuming you mean:

    setlocal
    set OK="N"
    

    Then this is more about setlocal and endlocal than the set command. From This technet article on Batch files:

    SETLOCAL and ENDLOCAL

    The SETLOCAL and ENDLOCAL commands are used together. When you use the
    SETLOCAL command within a batch file, any environment changes you make
    after that point are local to the batch file. For example, if you used
    the SETLOCAL command followed by the:

    SET TEMP=C:\TEMP command, the batch file would recognize the TEMP
    variable as containing the string C:\TEMP. However, if you were to run
    a different batch file or open a different MS-DOS Window, the TEMP
    variable wouldn’t contain this string. To prevent future environment
    variable changes from being local, you can use the ENDLOCAL command.

    This means that you can use Environment variables to store things you might need to check or alter later on in your Batch file. You could for example create a variable called OK, set it to “N”, then do something else. Based on the return value of something you can set it to “Y”. At the end of the Batch file you can check this again to see if you were successful or not.

    This is just guesswork without seeing some working code you’re talking about, but I think that’s what you mean.

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

Sidebar

Related Questions

I have a batch file that does the following: @IF EXIST C:\Program Files\MyAppFolder (
I have a windows batch file in Windows 7 which does something with find.
I am creating a batch file in windows with the following command in it.
Currently I'm using a Windows batch file to build my software. It does things
I have a windows batch file that does this: for %%s in (*.sql) do
I am trying to understand a Windows batch file with the following statements: :GetVSCommonToolsDirHelper32
Android Emulator Icon in windows 7 does not show in TaskBar..see my Image... I
I need to write a batch file to unzip files to their current folder
Does a batch file execute processes in sequence only if the previous step has
How can I check the existence of a Windows service in a batch file?

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.