4NT - Powerful Command Prompt + My All-Time Favorite Utility (now Take Command)
Sat, Feb 19 2005 20:34
Update: 4NT is now called Take Command
Take Command by JPSoft is, in my humble opinion, one of the best apps ever created. It is a tool for the 'power user' who appreciates the power of the prompt (C:\>). :) It a console command prompt for Windows on steroids. I've used this app for over 14 years and it is still the one non-MS app I use more than any other.
This page in history starts with MS-DOS. Though the history of the command prompt goes much further back, DOS made the prompt famous. DOS is made up of two parts, the first being a library of functions in two files that are loaded into memory at boot time which other apps used to do common tasks like access files, display text on the screen, and get keyboard input ... these were best known to software developers. The second part of DOS is a collection of separate utilities such as EDIT, HIMEM, XCOPY, SCANDISK, etc. But the most popular utility, which many considered to be 'DOS' is COMMAND.COM, the little app that gives the user the C:\> prompt, interprets what the user types, and starts other apps. It contains a small set of built-in commands such as COPY, DEL, RMDIR, CD, MKDIR, etc.
COMMAND.COM is what most everyone knew when it came to navigating the PC in the days of DOS. Other operating systems, such as Unix, had much more powerful prompts which supported coloring, better editing, and more commands. Until in 1989 JPSoft released the first, truly popular, COMMAND.COM replacement, called 4DOS, which was considerably more advanced than the simplistic COMMAND.COM. Where I entered the light was when Symantec licensed 4DOS 3.0 under Norton Utilities v6.0 in 1991 and called it NDOS with a few enhancements like a nice help system. I totally dug into the enhanced capabilities with the best example being my AUTOEXEC.BAT which had an animated ASCII art GUI powered by NDOS.
Now-a-days, the popular command interface for Windows is cmd.exe, which has come a long ways since COMMAND.COM, but is still a far cry from being a (relatively) powerful prompt. 4NT is JPSoft's Windows NT/XP command prompt replacement with considerable enhancements. This one little apps just keeps impressing me as I've discover new ways of using it continually for the last 14 years. It is the only app I've used for so long and is still the best.
.NET is my choice of programming environment, but some things (usually involving working with files) are just faster to code up in 4NT. I write a lot of console apps in C#, batch apps in 4NT, and use 4NT to bring all the magic together. Working here at Microsoft, I'm amazed at how much the console is used and how it seams that much of a dev's world is spent on the command prompt console.
What's So Cool
Commands & Environment
For starters, cmd.exe (the basic Windows Command prompt) supports about 50 built-in commands, 4NT has 130 built in commands. cmd has a very simplistic help system and 4NT has a full Compiled Help (.chm) cross-linked help system with examples, full descriptions, hints, tips, and more. 4NT supports copying & pasting on the prompt, popup ASCII windows, selection of files for commands, advanced inclusion/exclusion sets on files, full built-in FTP/FTPS/TFTP/HTTP/HTTPS support from any command, file/dir colorization, control of the Windows GUI, send e-mail, and the list goes on ... all of which cmd does not support (at all or without external help). All of the cmd commands are fully supported in 4NT, but with more command line options. But I've only begun!
cmd supports a few (~7) functions with variables (try 'help set' at the cmd prompt). 4NT contains a library of 150 variable functions (in additional to the 130 commands) that do things such as determine file sizes, system memory availability, type of drives on the computer, file read/write/seek/etc, all common string operations, numeric processing, registry editing, and even regular expressions.
4NT has over 100 additional internal variables that return information like the state of the alt, ctrl, shift keys, the day of the week, the current directory, the number of milliseconds since Windows started, how many pixels the screen is wide, the battery life remaining on a laptop, and of course, much more.
All put together, these enhancements make an amazingly flexible and powerful environment to script in. 4NT supports a "Batch to Memory" .btm file format which runs faster, can be compiled, and has a full debugging Interactive Development Environment (IDE). You can create subroutines that pass parameter, use if blocks (iff, elseiff, endiff), and pull all these commands, variable functions, and internal variables, into a substantial scripting experience.
del /s /r /w /x /y /z c:\temp
Move to the recycle bin all files and directories under c:\temp, removing empty subdirectories & system/hidden/readonly files, and without prompting the user.
dir /o:-s /k /m /2 c:\windows\*.bmp;*.gif;*.jpg
Show all .bmp, .gif, and .jpg files in c:\windows without the header or footer in two columns sorted from largest to smallest file size.
select /a:h-d del (.)
Brings up a selection dialog of the hidden files (no directories) in the current directory to select what to delete.
Shows the file size of explorer.exe in megabytes.
drawbox 4 4 8 30 1 bri yellow on blue fill blue %+ scrput 6 9 bri white on blue Hello Fine People
Draws a blue box on the screen with a yellow border with the saying 'Hello Fine People' inside it in bright white.
|My splash screen when I startup the 4NT prompt. |
|Pressing [PageDown] will show the history of commands from which you can choose to run again. Yes, it is mouse activated too. |
|A directory listing with my colorizations. Green for docs, purple for text files, red for executables, light blue for zips, and yellow for anything else. |
You can download 4NT from JPSoft to try it out. Friends can e-mail me and I'll send them a trial version (covered under the EULA) that is pumped up with my favorite settings, includes the splash screen above, example batch files, WinKey, and a few more enhancements.
The price to purchase is a bit high, $70, but it is the best $70 I've ever spent on software.
I recommend using WinKey, a free hot key app, to assign [WindowsKey+C] or [WindowsKey+4] to run 4NT. This allows to you to rapidly pop up a 4NT prompt with one keyboard shortcut. (update, I now use AutoHotKey instead of WinKey)
When it's all said and done, 4NT is not for the faint of heart, but the user who enjoys feeling the power of command prompt. There is so much more that could be said, but I could go on for hours; so hopefully, if you're a prompt user, you'd see this is worth checking into. One of the reasons I've enjoyed this app so much is that even after 14 years, I'm still discovering commands, functions, and ways of using it all together.