16. October 2015 · Comments Off on Where to find Command-line Utilities for Batch Files · Categories: Development, TechBits · Tags:
Command-line utilities are useful for expanding the capabilities of batch files. There are many more available, but the below list can be used as a starting point.

Free Command-line Utilities for Batch Scripts

NameDescriptionSourceSize Uncompressed (kB)More info/License
BusyBoxA single binary with many common Unix tools. Often used in embedded Linux systems. Fewer options than originals due to size optimizationRon Yorston647kGNU General Public License
DSToolBoxTwelve utilitiesDreamCycle Studios40-158kFreeware
F2KO SoftwareOver 40 utilitiesCMD ToolsVariousFreeware
Gammadyne's Free DOS UtilitiesSixteen various utilities including timers, file management tools, and a DOS shellGammadyne's Free DOS Utilities76-421kFreeware
GnuWinOver 160 separately downloadable native Win32 open source utilities for Windows 2k-Win7GnuWinVariousGNU General Public License
Gow (Gnu On Windows)Over 100 useful open source UNIX applications compiled as native win32 binariesBrent Matzelle1-1795kOpen Source MIT License
GtoolsSeveral command-line and GUI Windows Administrative Toolsgtools current version19- 520kOpen Source
HexatomiumAbout a dozen utilitiesWindows Apps by FS112-320kFree for personal use
Horst Schaeffer's Software PagesSeveral various utilities  CMD 32/64 bit 4-35kFreeware
NircmdA small command-line utility that can perform many different tasksNirSoft43kFreeware. 32 and 64 bit versions also available
Ritchie LawrenceA somewhat outdated (2005), but still useful list of command-line utilitiesRitchie LawrenceVariousMostly Freeware
Rob nan der Woude's Scripting PagesDescriptions and download links for a many utilities. Probably the most up-to-date and comprehensive listing of its kindBatch UtilitiesVariousAlmost entirely Freeware
RubyPdf Software Download CenterSpecialized PDF ToolsRubypdf TechnologiesUp to a few MBMostly Freeware
Small command line utilitiesOver 150 system utilities. Archive package or separately. Page also has small GUI tools and NET utilities.LTRData6-100k. Most under 20kFreeware
SwissFileKnifeCombines many functions into a single, portable executableStahlWorks Technologies 1,576kBSD License. Binaries and source code available. Versions for Mac and Linux.
SystemTools UtilitiesA dozen utilities focusing on user account and networking tasksSystemTools SoftwareMost under 50kFreeware
Util32Twenty 32-bit useful command-line utilitiesPersoft23-180kFreeware
Uwe Sieber's HomepageFile, drive, USB and misc toolsUwe Sieber's HomepageVariousFreeware

28. October 2012 · 1 comment · Categories: Development · Tags:
This guide describes how to setup a text editor to use the Visual C++ Studio Express compiler. Although many IDEs, including Visual C++ Studio, can edit code, text editors (a.k.a. programming or code editors) are often simpler, faster, are easier to use and configure, and have a shorter learning curve, especially since many users already use them and are thus familiar with the interface. In addition, many older and slower computers don’t have the resources to run IDEs such as Visual Studio very efficiently.

Many of the popular free compilers once used with text editors are now considered outdated. Today, the trend is towards using dedicated IDEs to write and compile code in an integrated environment such as Visual C++ Studio, or with other IDEs designed to be compatible with one or more independently developed compilers. Because IDEs have largely replaced the now out-of-fashion text editor as the standard coding environment, many text editors are no longer developed, supported or updated specifically for use with compilers. Because of these factors, many text editors may no longer work easily with up-to-date compilers. This guide provides one workaround solution.

The instructions for this guide were tested on a PC running Windows XP SP3, Visual C++ Studio Express 2010, and using the PSPad (ver 4.5.3) text editor. The instructions should be similar for other versions of Windows, Visual C++ Studio editions, and other text editors.

Visual Studio’s compiler is the cl.exe executable located in the “C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\” directory. Without getting into all the technical details, this file only executes properly within Visual Studio’s integrated environment, so directly setting it up in PSPad’s highlighter settings won’t work. In fact, even if you try to execute cl.exe from a Windows Command window within Visual Studio, you will get an error. The solution is to compile from Visual Studio’s command window, which looks just like a regular Windows Command window, but is actually the Visual Studio environment. To accomplish this, the source code file from the text editor is passed to a batch file, which starts Visual Studio’s environment and compiles the file. Sounds somewhat complicated, but it’s simple once explained.

Below is the batch file code:

@echo off

REM This file allows text editors to compile C++ files in Visual C++.

REM Modified from the shortcut in Program Files
CALL "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"

REM For 32bit Intel Processors
rem CALL "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"

cl.exe /EHsc %1


Basically, the batch file consists of only four lines: (1) @echo off, (2) CALL the Visual Studio environment, (3) pass the source file to cl.exe with parameters, and (4) pause. That’s it. Copy the code and save it with a .bat file extension. I saved my file as vsbat.bat. There are two CALL commands in the batch file to two batch files in VS (Visual Studio). The first (vcvarsall.bat) is the path taken from the shortcut for the VS Command window in the start menu and slightly modified for use in the batch file above. The other (vcvars32.bat), is the path for the VS environment batch file for 32bit processors in the “VC\bin\” directory. If you have another processor, or use another edition of VS, either batch file may have a slightly different path, name and/or contents depending on your processor. If any of the paths are different from those above, just right click on the VS Command prompt icon in the start menu and and select properties to get the path and change the above batch file accordingly. In any case, both CALL statements just start the VS environment in a Command window according to the processor type. In the above batch file, the 32bit Intel Processor command is commented out but left in for information purposes. The first one should be the only one necessary. The cl.exe command starts the compiler with the “/EHsc” option which tells the compiler not to throw a C++ exception and “%1”, which is the source file parameter passed to the batch file. Finally, pause just keeps the command window from closing.

Save the above batch file somewhere on your PC and start PSPad. Select Settings->Highlighter Settings->C/C++->Compiler Tab in PSPad’s menu. Enter the information as shown in the screenshot below (click to enlarge image):

PSPad compiler settings

For the Compiler setting, enter the path to the batch file you saved (vsbat.bat). For the Parameters setting, enter “%File%” (with parentheses), which is the source file currently loaded in the editor. The Default Directory entry is optional and self-explanatory. For the Run after Compilation setting enter “cmd.exe /K %Name%.exe” to automatically run the executable after compilation (after closing the VS Command Window). Check the Save All Files Before Compilation box and hit OK to save the settings. That’s it. PSPad is ready to compile C++ source files with Visual Studio and to run its executables.

05. April 2011 · 1 comment · Categories: Development · Tags:
This guide illustrates a quick method to add pre-compiled PDCurses to MingW on WinXP and verifying the installation. From time to time, it may be necessary to compile source code in Windows where the NCurses or Curses library is required, and often PDCurses can be used as a substitute. Since PDCurses isn’t included with a MingW installation it must be installed separately. Although other tutorials for installing PDCurses are available, they may contain outdated information, require compiling source code, use overly complex installation instructions, or are specific for various IDEs. This guide uses pre-compiled PDCurses version 3.4 and MingW GCC version 4.50. You can type “gcc –version” (without quotes) at the msys prompt to identify your gcc version.


PDCurses (Pubic Domain Curses) is the multi-platform, public domain implementation of the terminal display library NCurses. NCurses (New Curses) is an implementation of Curses (a play on the term cursor optimization), both of which are terminal control libraries for UNIX and UNIX-like systems. Although not identical, PDCurses, NCurses, and Curses enable programmers to add mouse support, screen painting, colors, key-mapping, windows, and more to text-based applications without regard to the terminal type. An example of PDCurses in use is shown here. MingW (Minimalist GNU for Windows) is a minimal Open Source programming environment for developing Windows native applications not requiring 3rd-party Runtime DLLs. However, MingW does utilize some Microsoft DLLs provided by the Microsoft C runtime library. It includes the GNU Compiler Collection (GCC) and associated tools, the GNU binutils.


Download the PDCurses version 3.4 file Download pdc34dllw.zip (86.9 KB) from Sourceforge.com and unzip it. This version is the Win32 DLL for console with Unicode. Copy the extracted files to the following folders:

  • pdcurses.lib to MingW’s “/lib” folder
  • curses.h and panel.h to MingW’s “/include” folder
  • pdcures.dll to MingW’s “/bin” folder


Example command using PDCurses to compile the file checkthis.c:

gcc checkthis.c -o checkthis -lpdcurses

If the following code compiles, PDCurses is installed correctly.

/*  checkthis.c  */

#include <curses.h>

int main()




printw("hello world\n");






Bad Behavior has blocked 386 access attempts in the last 7 days.