Creating and Debugging Windows Batch Files

Stop struggling with your Windows CMD batch file commands!

Take Command is a comprehensive interactive command line and Windows batch scripting toolkit that makes your command prompt easier to use and far more powerful. Take Command includes tabbed console windows, File Explorer integration, hundreds of major enhancements to standard CMD commands such as COPY, DEL, DIR, and START, 235 internal commands, improved command line editing (including powerful filename completion, and a wide variety of cut and paste options), and thousands of other features you won'f find in any other Windows command processor.

Take Command is also the best solution for Windows batch file development, featuring compatibility with CMD commands, while offering advanced extensions such as an integrated IDE including an editor and batch debugger, DO loops, SWITCH statements, subroutines, error and exception handling, monitoring and Internet commands, and over 680 internal variables and functions.


Windows Batch File Editing and Debugging Introductory Video
Reverse Proxy plugin provided by Sites R Us (

Are you a Windows developer, system administrator, operations, tech support professional, or an advanced user involved with script programming, debugging, and / or execution? Are you frustrated with the limitations of CMD batch file commands and batch scripting? Do you yearn for a real scripting language and an integrated IDE and batch debugger?

Batch files or scripts are text files that contain one or more commands and have a .bat or .cmd filename extension. They allow you to do everything from simplifying and automating routine or repetitive tasks, to complex business processes. Batch files can run both GUI and console applications, as well as internal command processor commands.

Once you have created them (typically with an editor like Notepad), CMD batch files can be executed as if they were executable programs. When you type the file name at the command prompt, the Windows command processor runs the commands sequentially as they appear in the file. Bat file commands can be either internal command processor commands (like COPY or DEL), or external applications (console or GUI). You can pass arguments ("batch parameters") to your script by entering them on the command line following the batch file name. You can even run batch files from within other batch files.

The program that runs batch files in Windows is the command processor (also called the command shell) CMD. Unfortunately, the Windows command shell has always been seriously lacking in even the most elementary features compared to the shells available in other operating systems such as Linux (which has bash, tcsh, zsh, etc.). And CMD hasn't been updated significantly since its first appearance in Windows NT 3.1 (which was released in 1993). Because of the many limitations inherent in CMD, users have often been forced to use the GUI for inappropriate tasks, or to write programs (for example, using C++ or Visual Basic) to perform simple tasks that the the command shell should have been able to handle.

Even worse, creating batch files in Windows has always been tedious (and painful for any non-trivial scripts). Windows provides very little support for creating batch files, and none at all for debugging them. Most developers, system administrators and advanced users are resigned to using the crude and inefficient (or non-existent!) tools provided with Windows when creating and debugging their Windows batch files.

But creating batch files doesn’t have to be frustrating. Take Command is the ideal solution to your CMD batch files woes. With more than 28 years of offering command line and batch file solutions, JP Software has perfected Windows batch scripting tools that are easy to use, customizable, and well supported (via our extensive online documentation and active support forums). Take Command is a complete CMD replacement. that provides you with a vastly better UI for creating batch files, and thousands of other features that are not available in CMD (or even in those Linux shells).

In addition, Take Command is a powerful batch file programming tool, offering compatibility with CMD and powerful extensions such as DO loops, error and exception handling, block-structured logic, an integrated IDE with tabbed edit windows and a sophisticated batch debugger, third-party plugins, and over 620 built-in variables and variable functions. Creating batch files is easier, more efficient and less tedious (with tools to debug and automate your processes and scripts). Batch file programming has never been more painless and more powerful!

Windows treats .BAT and .CMD file name extensions the same. The command processor will open the batch file, read one line, close the batch file, execute the line, open the batch file, read the next line, close the batch file, execute the line, etc. There is a third extension type .BTM that can only be used in Take Command, which runs faster than a .BAT or .CMD file. A .BTM file is opened, the entire file read into memory, and closed. Take Command then runs the file from memory.

Take Command has a variety of features to Improve the efficiency of your batch file development:

  • The integrated and familiar environment means you are immediately more productive with both your interactive and scripting tasks.
  • The consistent syntax will reduce your learning and development time.
  • Take Command is compatible with your existing CMD batch files -- and runs them faster than CMD.
  • Create and debug your scripts in a fraction of the time with the integrated graphical IDE. The IDE includes tabbed edit windows and a sophisticated debugger with single stepping, breakpoints, syntax coloring, popup variable windows, bookmarks, tabbed variable and watch windows. Windows batch file programming has never been easier or more powerful!
  • The TCC scripting language is an extensive superset of CMD, with over 235 internal commands, 388 internal functions, and 298 system variables. The language includes a complete set of flow control structures including IF-Then-Else, DO and FOR loops, SWITCH statements,, subroutines, batch libraries, and more. And the conditional tests (DO, FOR, IF, etc.) have a much broader selection of tests available than in CMD.
  • Create your own internal functions by combining variables, functions, and commands.
  • Automate your applications by sending keystrokes to any window (tabbed, console or GUI).
  • TCC provides multiple types of I/O redirection, including redirecting and piping to STDERR, "here-document" and "here-string" redirection, and TEE and Y pipe fittings.
  • The TCC file handling commands (COPY, DEL, DIR, MOVE, etc.) allow you to specify multiple filenames, or optionally the name of a file that contains the filename arguments. (COPY even supports multiple targets as well as multiple sources.)
  • Select or exclude files by date, time, size, owner, and/or description, and extended wildcards or regular expressions for extraordinary flexibility in file management.
  • You can customize your directory listings with PDIR, a programmable DIR command replacement.
  • Take Command includes ANSI x3.64 support for colorizing your text output.
  • Environment variable handling has been greatly enhanced, including nested variables, delayed expansion, multidimensional array variables, and read and write access to the system, user, and volatile variables in the Windows registry.
  • Query the WMI (Windows Management Interface) to retrieve system configuration information.
  • Monitor your system's hardware and software events, and execute commands when an event is triggered. You can monitor directory or file changes, the clipboard, event logs, network connections, processes, services, and Firewire and USB connections.
  • You can access FTP, TFTP and HTTP (including SSL and SSH) directories in all file-handling commands (COPY, DEL, DIR, MOVE, etc.).
  • Send SMTP, SMPP, and SNPP messages.
  • Display floating text (without a window) on your monitor (like TV or monitor setup prompts).
  • Redefine your commands or directory names with aliases, and create new commands and functions for your regular tasks.
  • Take Command includes internal support for PowerShell, Lua, Perl, Python, REXX, Tcl/tk, and any Windows Active Scripting language (such as JavaScript and VBScript). You can even combine multiple languages in your scripts.
  • Write your own commands or variables with plugins using C++, Delphi, or VB, or use the many third-party plugins.
  • Batch files can optionally be compressed and encrypted, which can be useful in a corporate environment where you do not want the end users to modify the scripts.


Learn about our 90-day unconditional guarantee, multi-system licensing and resellers.

Learn more about the Windows Command Prompt.

Take Command is compatible with any version of Windows 7, Server 2008R2, Windows 8, Server 2012, Windows 10, and Server 2016, including 64-bit versions. It requires a minimum of 80Mb of free disk space.