Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
The batch tag is used for Windows batch file questions.
4
votes
Accepted
Making a .bat batch command-line interface
You can use a FOR /F to parse out the command from the arguments.
I would define a variable containing a delimited list of all valid commands. Then you can use simple search and replace to validate w …
4
votes
Msbuild batch - if any build fails than skip the last one
You probably want to localize any environment changes.
You should initialize your variables to a known state at the beginning, otherwise you could get the wrong result.
You have a lot of redundant c …
10
votes
Accepted
Batch-File FizzBuzz
Use FOR /L to iterate a range of numbers - much faster than SET /A with GOTO loop.
Use SETLOCAL to localize variables so no need to undefine them. The EnableDelayedExpansion option does just that so …
3
votes
Accepted
Checking for a date and compare 2 different files
General issues:
1) You should learn how to create and call batch functions so you have re-usable code. See the batch function tutorial at DosTips.com. (Note that the name of the site is misleading. … Batch treats numbers prefixed with 0 as octal. So a value of 09 would be an error, since 9 is not an octal digit. …
2
votes
Accepted
Make pinging faster while looking for a Windows PC
You will have to reduce the timeout interval with the -w option (milliseconds), but I don't know what is the minimum timeout that still gives reliable results.
You could try
ping -w 500 -n 1 192.16 …
3
votes
Accepted
Improving efficiency and flow by changing subroutine orders
1) What is this line supposed to do?
%comspec% /c exit %0%
I can almost guarantee it is not doing what you think. The most it can do is set the ERRORLEVEL. However, The EXIT command expects a numer …