About 16 results
Open links in new tab
  1. Guide to Windows Batch Scripting - /* steve jansen

    Mar 1, 2013 · This series will share some conventions I picked up along the way for scripting in Windows via command prompt batch files. The Windows PowerShell is definitely sweet, but, I still like batch …

  2. Windows Batch Scripting: Getting Started - /* steve jansen

    Mar 1, 2013 · You can create and modify batch scripts on just about any modern Windows machine. The tools come out of the box: the Windows command prompt and a text editor like Notepad.exe.

  3. Windows Batch Scripting: Variables - /* steve jansen

    Mar 1, 2013 · I have a SQL loader cmd which I am calling from a batch script. The data filename is not constant (we have a timestamp appended to it each time the file is generated and populated).

  4. Windows Batch Scripting: Advanced Tricks - /* steve jansen

    Mar 1, 2013 · Supporting “double-click” execution (aka invoking from Windows Explorer) Test if %CMDCMDLINE% is equal to %COMSPEC% If they are equal, we can assume that we are running …

  5. Windows Batch Scripting: If/Then Conditionals - GitHub Pages

    Mar 1, 2013 · IF /I "%var%" NEQ "0" ECHO inequality with 0 IF /I "%var%" GEQ "1" ECHO greater than or equal to 1 IF /I "%var%" LEQ "1" ECHO less than or equal to 1 Checking a Return Code IF /I …

  6. Windows Batch Scripting: Functions - /* steve jansen

    Mar 1, 2013 · There are a few gotchas to pay attention to: Your quasi functions need to be defined as labels at the bottom of your script. The main logic of your script must have a EXIT /B [errorcode] …

  7. Windows Batch Scripting: Loops - /* steve jansen - GitHub Pages

    Mar 1, 2013 · This syntax is slightly different when FOR is used in a batch file, as it needs an extra percent symbol, or %%I. This is a very common source of errors when writing scripts.

  8. Windows Batch Scripting: stdin, stdout, stderr - /* steve jansen

    Mar 1, 2013 · You can quickly create a new text file, say maybe a batch script, from just the command line by redirecting the command prompt’s own stdin, called CON, to a text file.

  9. Windows Batch Scripting: Return Codes - /* steve jansen

    Mar 1, 2013 · Today we’ll cover return codes as the right way to communicate the outcome of your script’s execution to the world. Sadly, even skilled Windows programmers overlook the importance of …

  10. Windows Batch Scripting: Parsing Input - /* steve jansen

    Mar 1, 2013 · Robust parsing of command line input separates a good script from a great script. I’ll share some tips on how I parse input. The Easy Way to read Command Line Arguments By far the …