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… 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
That doesn’t look valid to me at all.
Assuming you mean:
Then this is more about setlocal and endlocal than the set command. From This technet article on Batch files:
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.