This page lists some console utilities I wrote in C#.
To allow using them in batch files, most utilities return their results as errorlevels.
Check the source code and the command line help text to translate the return codes/errorlevels back to results.
Some of these utilities were tested in Windows XP, all of them with release date before August 2019 in Windows 7, all later versions in Windows 10.
They were compiled with Visual Studio 10 Express Edition (Windows XP and 7) and Visual Studio Community 2019 (Windows 10), with the target framework set to .NET Framework 4 Client Profile (unless stated otherwise in the source code and help text).
Click a download icon to download the program. | |
Click a check mark icon to view the ZIP file's MD5 and SHA1 checksums. | |
Click a question mark icon to view the program's help text. | |
Click the program name to view its source code. |
C# Examples | |||||||
---|---|---|---|---|---|---|---|
Name | Version | Description | Last modified | Remarks | |||
ActivateWindow | 1.03 | Batch tool to activate the specified window | 2023-08-08 | ||||
AirRegPHCmd | 1.00 | Search downloaded Dutch aircraft database (PH-***) for specific aircraft(s) | 2020-03-13 | This program requires a downloaded Dutch aircraft registration file in Excel format, located in the subdirectory "PH", and ExcelDataReader.dll, ExcelDataReader.DataSet.dll and ICSharpCode.SharpZipLib.dll in the program's parent directory | |||
Asc | 1.02 | Return the decimal character code for the specified ASCII character | 2021-08-26 | ||||
ASCII | 1.00 | Convert text from a file or standard input into ASCII and send it to standard output | 2014-01-30 | As there are many "standards" to choose from when encoding text to Unicode, this tool may sometimes fail and return garbled text. In that case, try Unicode2ASCII instead. | |||
Back2Base | 1.00 | Move out-of-sight windows back to the primary screen | 2020-03-28 | This is a GUI version of CatchStrayWindows. | |||
Barcode | 1.01 | Generate barcode bitmaps using EAN-13 TrueType font | 2020-03-20 | Requires EAN-13 TrueType Font. | |||
BatCodeCheck | 0.41 | Batch Code Check: search batch source code for unterminated quotes, parenthesis and variables, and a number of other common coding errors | 2022-12-06 | Still in beta! More details on BatCodeCheck. |
|||
BatHL | 0.51 | Batch HighLighter: search batch source code for unterminated quotes, parenthesis and variables, and a number of other common coding errors | 2014-02-07 | No longer supported, use BatCodeCheck instead | |||
BirdName | 3.07 | Translate animal names from and to almost any language | 2018-12-06 | This is a GUI program! This compiled executable is the successor of the discontinued BirdName.hta. |
|||
BootState | 1.00 | Show Windows' boot state, e.g. Normal, Safe mode, Windows PE | 2017-10-02 | ||||
CameraModel | 2.01 | Return the camera model for the specified image file | 2015-09-29 | This utility searches only the first kilobyte of the specified image file, which makes it a lot faster than FINDSTR or STRINGS. | |||
CanonModel | 1.00 | Return the Canon camera model for the specified image file | 2012-10-07 | This utility searches only the first kilobyte of the specified image file, which makes it a lot faster than FINDSTR or STRINGS. | |||
CapsLock | 1.01 | Read or set CapsLock key state | 2012-06-28 | ||||
CapsLockIcon | 1.03 | Customizable CapsLock key indicator | 2021-06-28 | This is a GUI program! | |||
CaptureDate | 1.05 | Return the capture date and time for the specified image file(s) | 2022-10-04 | This utility searches only the first Megabyte of the specified image file, which makes it a lot faster than FINDSTR, RxGrep or STRINGS. | |||
CatchStrayWindows | 1.00 | Move out-of-sight windows back to the primary screen | 2020-03-25 | For a GUI version check out Back2Base. | |||
CheckPath | 1.00 | Check if all directories in the PATH variable(s) really exist | 2021-12-29 | ||||
CheckVarsPHP | 1.02 | Check PHP code for unused variables and functions | 2022-08-27 | ||||
CheckVarsVBS | 1.10 | Check VBScript code for unused variables and subroutines | 2023-02-20 | ||||
Chr | 1.02 | Return the ASCII character for the specified decimal character code | 2021-01-10 | ||||
ClCalc | 2.01 | Command Line Calculator | 2023-02-13 | Based on code by "markman", found in a discussion section of CodeProject.com. | |||
ClipboardAppend | 1.00.1 | Send text to clipboard, appending it to existing text in clipboard | 2022-09-14 | ||||
ClipboardPrepend | 1.00 | Send text to clipboard, prepending it to existing text in clipboard | 2022-09-14 | ||||
CloneDate | 1.00 | Modify the LastModified date (timestamp) of the target file(s) to match the specified source file's timestamp | 2016-06-07 | ||||
ColorSelectBox | 1.00 | Batch tool to present a color picker and return the selected (console) color | 2018-08-30 | ||||
CompareFiles | 1.01 | Check if two files are identical | 2022-04-02 | ||||
CompareImages | 1.01 | Compare 2 images pixel by pixel, ignoring EXIF and IPTC metadata | 2022-10-13 | ||||
CompareSitemaps | 1.00 | Compare 2 XML sitemaps and display the differences on screen | 2022-10-13 | Also available in PHP | |||
ConsoleState | 2.00 | Set or get the visibility state of the current console | 2018-11-20 | ||||
Count | 1.00 | Count specified objects and return result as errorlevel | 2023-10-03 | ||||
CountCharPairs | 1.00 | Count character pairs in source files, e.g. {} in a C# source file | 2017-02-23 | ||||
CountDown | 2.01 | Count down for the specified number of seconds or until a key is pressed | 2020-07-13 | ||||
DateDiff | 1.02 | Batch tool to calculate the timespan between two specified dates | 2016-10-05 | ||||
DateTimeBox | 1.12.1 | Batch tool to present a Date/Time Picker dialog and return the selected date and/or time in the specified format | 2018-03-03 | Inspired by code from Gorkem Gencay on StackOverflow.com. | |||
DeDup | 1.02 | Remove duplicate lines from a text file or from redirected input | 2018-03-18 | Requires .NET Framework 4.5. | |||
DelTrash | 1.05 | Empty the Recycle Bin | 2024-06-10 | Based on code by Vinoth Kumar. | |||
DetectSound | 1.01 | Detect sound input on default microphone before detection period expires | 2022-11-19 | Based on code by Wendy Zang on MSDN | |||
DetectSpeakers | 1.00 | Check if speakers or headphones are connected | 2022-04-03 | Uses NAudio library for .NET by Mark Heath et al, required DLLs from this library are included in the ZIP file. | |||
DialogBoxes | 0.18.1 | DLL to present dialogs in COM aware scripting languages | 2019-02-01 | ||||
Doc2Txt | 1.00 | Return the plain text content of a Word .DOC file without requiring Word | 2022-01-12 | ||||
Docx2Txt | 1.01 | Return the plain text content of a Word .DOCX or OpenOffice .ODT file without requiring Word or OpenOffice | 2022-01-16 | ||||
Drives | 3.00 | List available and/or used drive letters | 2022-02-03 | Based on code found at DreamInCode.net. Unlike ListDrives.exe, Drives.exe does not require elevated or administrative permissions. |
|||
DropDownBox | 1.17 | Batch tool to present a DropDown dialog and return the selected item | 2020-08-28 | ||||
Easter | 1.00 | Calculate the date of Easter Sunday for the specified year | 2022-01-27 | ||||
EnergyLoggerConfig | 1.00 | Create a binary configuration file for the VoltCraft Energy Logger 3500 or 4000 | 2017-02-23 | The ZIP file also contains a GUI version "EnergyLoggerConfigGUI.exe". | |||
Epub2Txt | 1.01 | Extract plain text from an EPUB file and send it to the screen | 2023-05-02 | ||||
Excel2Any | 1.00 | Open a spreadsheet in Microsoft Excel and save it in "any" (known) format | 2016-01-21 | Requires Excel 2007 (with Save as PDF or XPS Add-in) or later. | |||
FastPing | 1.00 | Faster PING alternative | 2012-09-25 | ||||
FileHistory | 1.01 | Save a timestamped copy of any monitored file when it is changed | 2024-08-09 | ||||
FixWordUnreadableContent | 1.00 | Use LibreOffice/OpenOffice to fix Word documents with unreadable content | 2024-08-23 | ||||
FontSelectBox | 1.01 | Batch tool to present a Font Select dialog and return selected font properties | 2019-01-17 | ||||
GetDimensions | 1.00 | Get the dimensions of an image file | 2024-05-21 | ||||
GetMyPID | 1.00 | Return the parent process' PID. | 2011-05-16 | Requires ParentProcess.cs by Jared Barneck | |||
GetSystemInformation | 1.02 | Get properties and values of .NET's System.Windows.Forms.SystemInformation class | 2022-01-03 | ||||
GetSystemMetrics | 1.03 | Wrapper for the WINAPI (user32.dll) GetSystemMetrics function. | 2017-03-07 | ||||
GetSystemMetricsDLL | 1.01 | Read-only wrapper DLL for the WINAPI (user32.dll) GetSystemMetrics function. | 2017-04-06 | In VBScript use WScript.Echo CreateObject( "RobvanderWoude.GetSystemMetricsDLL" ).GetHelp( ) for help |
|||
GetTitle | 4.00 | Read the current Window's title, optionally removing the "Administrator:" prefix if running with elevated privileges (Vista and later), and optionally removing the appended command line. | 2011-05-10 | As of version 4.00, GetTitle works in "all" Windows versions, rendering GetTitleXP, the separate XP version, obsolete. | |||
HasHardware | 1.05 | Check the actual number of connected input and video devices available | 2024-03-21 | ||||
HasHID | 1.00 | Count number of mice and/or keyboards available at this very moment | 2024-03-06 | ||||
HasKeyboard | 1.00 | Count number of keyboards available at this very moment | 2024-03-05 | Based on Pavel Pachobut's C# wrapper for GetRawInputDeviceList on GitHub | |||
HasMonitor | 1.00 | Check the actual number of monitors connected at this very moment | 2024-03-09 | ||||
HasMouse | 4.00 | Check the actual number of mice available at this very moment | 2024-03-11 | Requires elevated privileges; use older version (included in ZIP file) if elevated privileges are not guaranteed | |||
HideInput | 1.03 | Read 1 line of keyboard input while hiding what's being typed. | 2018-09-28 | ||||
HTMLEntities | 1.00 | Convert Unicode characters to and from HTML entities and URL encoded characters | 2021-12-13 | This is a GUI program; sources are included in the ZIP file. |
|||
HTMLEscape | 1.01 | Display HTML-escaped input string in console | 2022-09-27 | ||||
InputBox | 1.38 | Batch tool to prompt for input (GUI) | 2021-05-23 | Most of the code comes from Gorkem Gencay on StackOverflow.com. | |||
InputBoxWF | 1.00 | Windows Form version of InputBox (no console displayed when used in VBScript etc.) | 2019-07-10 | No console means no result written to console: result can be saved in a file or sent to the clipboard. | |||
is6432os | 1.00 | Return "errorlevel" 64 if current OS is 64-bit, or 32 if it is 32-bit | 2010-07-04 | ||||
isDST | 1.03 | Return "errorlevel" 0 if a date is in Daylight Saving Time, or 2 if it isn't | 2023-05-02 | ||||
IsElevated | 1.00 | Return "errorlevel" 0 if current process has elevated privileges, or 1 if not | 2011-01-03 | ||||
IsFAT | 1.00 | Return "errorlevel" 0 if the specified drive is FAT formated, 2 if not, or 1 if not ready | 2011-04-22 | ||||
IsNTFS | 1.00 | Return "errorlevel" 0 if the specified drive is NTFS formated, 2 if not, or 1 if not ready | 2011-04-22 | ||||
IsRedirected | 1.02 | Return a number containing the redirection status of StdIn (+2), StdOut (+4) and StdErr (+8) | 2018-03-19 | Requires .NET Framework 4.5. | |||
KeyLocks | 1.01 | Return status for CapsLock, NumLock, ScrollLock and Insert keys | 2018-12-24 | ||||
Kolor | 1.03 | Set or get console background and foreground colors | 2016-03-09 | Use KOLOR /T for a list of color numbers | |||
ListDrives | 1.11 | Return a string containing all drive letters in use | 2022-12-03 | Unlike Drives.exe, ListDrives.exe may require elevated or administrative permissions on some computers. | |||
ListIntCmd | 1.07 | List all available internal commands | 2023-05-14 | ||||
ListNICs | 1.00 | List physical network adapters | 2011-11-01 | ||||
ListPrinters | 1.10 | List all available local printers | 2011-04-06 | ||||
ListProgs | 1.03 | List all programs registered in Windows' Uninstall keys | 2015-02-10 | Also available as ListProgs.bat (a lot slower). | |||
ListVerbs | 1.01 | List all verbs for the specified file extension | 2022-02-17 | ||||
LoCase | 2.04 | Rename specified files, or render redirected input, to lower case | 2022-09-05 | ||||
MaskText | 1.00 | Apply a mask to input text | 2016-12-12 | ||||
Mause | 1.06 | Mouse enabled pAUSE command | 2022-03-18 | Uses the ConsoleListener class by SWdV | |||
MessageBox | 1.34 | Batch tool to show a message in a MessageBox and return the button clicked | 2020-12-11 | ||||
MonitorClipboard | 4.00 | Monitor clipboard content in realtime | 2024-09-05 | This is a GUI program! | |||
MultipleChoiceBox | 1.00 | Batch tool to present a Checkbox dialog and return the selected items | 2018-11-27 | ||||
NewTempFile | 1.00 | Create a zero-byte temporary file and display its name on screen | 2012-07-02 | ||||
NumLock | 1.01 | Read or set NumLock key state | 2012-06-28 | ||||
NumLockIcon | 1.03 | Customizable NumLock key indicator | 2021-06-29 | This is a GUI program! | |||
ODT2Docx | 1.00 | Save LibreOffice/OpenOffice Writer .odt files as Word .docx | 2024-08-23 | Requires LibreOffice/OpenOffice, its SDK and a 32-bit Java runtime. | |||
ODT2PDF | 1.02 | Save LibreOffice/OpenOffice Writer files as PDF | 2024-08-22 | Requires LibreOffice/OpenOffice, its SDK and a 32-bit Java runtime. | |||
ODT2Txt | 1.00 | Return plain text content of an OpenOffice file without requiring OpenOffice | 2022-01-17 | ||||
OpenFileBox | 1.05 | Batch tool to present an Open File dialog and return the selected file path | 2020-07-29 | ||||
OpenFolderBox | 1.03 | Batch tool to present a Browse Folders Dialog and return the selected path | 2018-09-28 | ||||
Paste | 2.00 | Read text from clipboard and write to file or screen | 2014-08-20 | ||||
PDFPageCount | 1.02 | Return the page count for the specified PDF file(s) | 2011-10-13 | Based on sample code by Dharmaraj Nagarajan | |||
PingSite | 1.21 | Check if a website is up and running | 2011-10-18 | ||||
PowerPoint2Any | 1.00 | Open a presentation in Microsoft PowerPoint and save it in "any" (known) format | 2016-01-22 | Requires PowerPoint 2007 (with Save as PDF or XPS Add-in) or later. | |||
PrintAny | 3.04 | Print files using the print command or verb registered for the file type | 2016-02-17 | Not all file types have registered Print(To) commands or verbs | |||
PrinterSelectBox | 2.07 | Batch tool to present a Select Printer dialog and return the selected printer | 2020-06-09 | Inspired by code from Gorkem Gencay on StackOverflow.com. | |||
PrintExcel | 1.00 | Command line Excel sheet printing tool | 2016-03-11 | Requires Excel. | |||
Printing | 3.05 | Pause or resume printing, or flush all queued printjobs on the specified printer(s), or list all printers, their status and number of printjobs | 2016-02-15 | ||||
PrintScreen | 1.04 | Save a screenshot as image or save the current console buffer as text | 2018-09-13 | Credits: Code to read console buffer by Simon Mourier; code for graphic screenshot by Ali Hamdar | |||
PrintWindow | 1.01 | Save a screenshot of the specified window | 2020-06-19 | ||||
ProgressBar | 2.00 | Batch tool to display a progress bar | 2023-03-30 | ||||
ProgressBarGUI | 1.00 | Batch tool to present a GUI style progress bar | 2023-01-30 | ||||
QuickEditMode | 1.01 | Get or set the current console's Quick-Edit mode | 2022-03-19 | ||||
RadioButtonBox | 1.01 | Batch tool to present a Radio Button group and return the selected value | 2018-11-13 | ||||
ReadLine | 0.30 beta | Read the specified line(s) from a text file or from standard input | 2012-05-19 | ||||
RichTextMessageBox | 1.03 | Batch tool to show a fully customizable message dialog and return the button clicked | 2020-09-18 | ||||
RoboMove | 1.00 | Move files in target directory tree to make it match the source directory tree | 2015-08-31 | Inspired by ROBOCOPY, but RoboMove only moves files, it does not copy nor delete them. | |||
RotateImage | 1.02 | Rotate a bitmap by a multiple of 90 degrees | 2017-12-28 | ||||
Rtf2Txt | 1.00 | Return the plain text content of a Rich Text Format (.RTF) file | 2022-01-17 | ||||
RunHidden | 1.00 | Run a console program or script hidden | 2017-05-02 | This is a Windows.Forms program, intended to run Console programs hidden. Unlike RunNHide, RunHidden will wait for the specified program to exit, so capturing the specified program's errorlevel is possible. |
|||
RunNHide | 1.01 | Start a console program or script in a hidden window | 2017-05-02 | This is a Windows.Forms program, intended to run Console programs hidden. RunNHide will start the specified program and continue without waiting for the program to exit, so capturing errors is not possible; use "wrapper" batch files for the specified program to add error handling. |
|||
RxGrep | 3.01 | Multi-line FindStr/Grep like tool | 2024-07-21 | See the FINDSTR page for a usage sample | |||
RxReplace | 1.02 | Multi-line regex find and replace tool | 2020-07-24 | ||||
SaveFileBox | 1.03 | Batch tool to present a Save File dialog and return the selected file path | 2020-06-24 | ||||
ScrollLock | 1.01 | Read or set ScrollLock key state | 2012-06-28 | ||||
ScrollLockIcon | 1.00 | Customizable ScrollLock key indicator | 2021-07-08 | ||||
SecondChoice | 1.02 | Alternative to Windows' native CHOICE command | 2016-11-15 | ||||
SendKeys | 1.00 | Batch tool to send keystrokes to the active window | 2020-06-26 | ||||
Shell32Icons | 2.02 | View all icons available in Shell32.dll | 2019-02-26 | This is a GUI program. Code to extract icons from Shell32.dll by Thomas Levesque on StackOverflow.com. |
|||
SiteMap | 1.03 | Create a basic sitemap.org compliant sitemap | 2015-11-19 | ||||
SplitTextFile | 0.50 beta | Split a large file into smaller chunks | 2013-11-08 | ||||
StringHash | 1.01 | Return the MD5 or SHA* hash value for the specified string | 2022-10-17 | ||||
SystemInformation | 1.03 | Wrapper for the .NET SystemInformation class | 2017-03-19 | ||||
SystemInformationDLL | 1.01 | Wrapper for the .NET SystemInformation class | 2017-03-26 | In VBScript use WScript.Echo CreateObject( "RobvanderWoude.SystemInformation" ).GetHelp( ) for help |
|||
SystemTrayMessage | 1.06 | Display a tooltip message in the system tray | 2018-12-26 | ||||
Tail | 1.01 | Return the specified number of lines from the end of the specified file | 2013-11-19 | Code to detect redirection by Hans Passant on StackOverflow.com. Code to detect file encoding by Jason Pierce on StackOverflow.com. |
|||
Tee | 1.03 | Tee port for Windows: redirect Standard Input to Standard Output and to a file | 2018-03-15 | Requires .NET Framework 4.5. | |||
TestCommandLineArgs | 1.00 | Test C# command line parsing | 2020-07-30 | ||||
TestSitemap | 1.04 | Test all URLs encountered in an XML sitemap | 2022-11-09 | ||||
ToString | 1.02 | Batch tool to format numbers and dates the .NET way | 2022-02-25 | ||||
TouchDetect | 0.10 | Check if touch enabled devices are available | 2016-07-10 | Alpha release, not tested on touch enabled devices yet! | |||
TranslateCulture | 1.01 | List translations for weekdays and/or month names for the specified cultures (languages) | 2015-10-06 | ||||
Trash | 1.01 | Send specified file(s) to the recycle bin | 2023-06-10 | ||||
Trim | 1.00 | Trim leading and trailing whitespace (including linefeeds) from string | 2022-09-03 | ||||
TrueName | 1.02 | Displays the true path of a file or directory, like COMMAND.COM's internal TRUENAME command | 2017-06-15 | Handles SUBSTituted drives as well as mapped network drives and directory junctions, and even some combinations. | |||
Unicode2ASCII | 1.00 | Convert text from a file or standard input into ASCII and send it to standard output | 2014-01-30 | As there are many "standards" to choose from when encoding text to Unicode, this tool may sometimes fail and return garbled text. In that case, try ASCII instead. | |||
UpCase | 2.02 | Rename specified files, or render redirected input, to all upper case | 2018-03-12 | Requires .NET Framework 4.5. | |||
URLEscape | 1.00 | Display URL-escaped input string in console | 2022-09-27 | ||||
UTF8removeBOM | 1.00 | Read a text file and save the text in UTF-8 format without Byte Order Mark | 2019-01-18 | ||||
WaitASecond | 1.00 | A 900..1100 milliseconds random time delay | 2011-05-11 | ||||
WANIP | 1.02 | Get the computer's WAN IP address | 2018-12-12 | ||||
WGetIE | 1.02 | Save a web page to a file, using Internet Explorer | 2018-08-19 | ||||
WGetLite | 1.01 | Get web content (text only) | 2018-12-12 | ||||
Which | 1.48 | Port of the UNIX command to Windows | 2016-02-21 | ||||
WinVerCL | 1.00 | Console version of Windows' native WINVER command | 2022-04-21 | ||||
WMIGen | 10.0.15.6 | Generate Batch, C, C++, C#, Delphi, F#, Java, JScript, KiXtart, Lua, Object Pascal, Object Rexx, Perl, PHP, PowerShell, Python, Ruby, Tcl, VB .NET and VBScript code for WMI queries | 2023-02-25 | This is a GUI program! This compiled executable is the successor of the discontinued WMIGen.hta. Based on the example from the Microsoft TechNet ScriptCenter article Scripting Eye for the GUI Guy. |
|||
Word2Any | 1.02 | Open a Microsoft Word document and save it in "any" (known) format | 2016-01-30 | Requires Word 2007 (with Save as PDF or XPS Add-in) or later. | |||
Word2OpenOffice | 1.00 | Open a Microsoft Word document and save it in OpenOffice ODT format | 2022-01-04 | Requires Word. | |||
Word2Txt | 1.05 | Extract plain text from a Word document and send it to the screen | 2024-08-27 | ||||
WPD | 1.00 | Open a Word document with identical name and location when doubeclicking a WordPerfect document | 2019-07-28 | ||||
WPD2Txt | 1.00 | Return plain text content of a WordPerfect file without requiring WordPerfect | 2022-01-21 | ||||
Youless | 1.00 | Read data from a Youless LS120 energy monitor device | 2023-03-24 |
page last modified: 2024-09-05; loaded in 0.0496 seconds