Foamplate

You are not logged in. Login
Command Prompts
Aug. 13, 2026

You'll never know the power of the dark side! The dark side of computing. The darkness being the black background with white text that typically comprises a command prompt. If you're not using command prompts for your tasks, I say you should. Never can there be a more direct way of telling your computer what to do than just by typing the commands directly into it.

Sure, there's now AI computer use systems, where you can tell the AI bot to perform actions on your system and then it perform the actions for you, but do you really want to trust that AI bot with full access to your system? Well I don't anyway.

Typing commands into a command prompt is really the way to go. There's lots of kinds of command prompts too. On Windows, you have the Windows command prompt. The commands you can use there have been in place since the days of DOS. Creating a directory there involves typing the "mkdir" command, then the name of the directory you want to create. "mkdir my_directory". There you have it, my_directory is created in the current directory. You could remove the directory with the "rmdir" command. See? Easy, creating and removing directories. You can use the "cd" command to change to different directories. Say you want to change to the root of your current drive. You could type "cd \" and you'd go straight there. Notice you don't need to type the drive letter in this case. If your current drive is C:, then you type that command, your new directory would be C:\. Little shortcuts like that can save you time and energy when performing tasks on your system. Sure, you've only saved 2 characters of typing, but if you do that over and over again, you save 2 characters every time, and it adds up over time.

One thing about the CD command in Windows command prompt - if the directory you want is on a different drive, you'll have to pass some parameters to make it do that for you. So like, if you are on the C: drive, and you want to switch to D:\my_dir, you'll need to pass the /d parameter. Like this: "cd /d D:\my_dir". Then, your drive will change along with the path.

If you are always switching between drives, it can be somewhat inconvenient to keep having to remember to pass that /d parameter. What's more, often times when you switch to one directory, you'll want to switch back to the directory you were at before. That's where directory stacks come in handy. Instead of the "cd" command, you can use the "pushd" command. It works like this: say you are in the C:\ directory then you want to switch to D:\my_dir, you could type like so "pushd D:\my_dir". Then, you'll be taken to the D:\my_dir directory. Later, you want to switch back to the directory you were at before. Instead of "cd" or another "pushd" command, you could type "popd". Then you'll be taken to the directory you were at when you ran the "pushd" command. You can stack them up too, pushd to this directory, then pushd to that directory, popd from there to go back to this directory, popd again to go back to the original directory. That way you have this stack of directories you've visited.

If you use the command prompt a lot, chances are you'll end up running some complicated commands once in a while. You'll do some crazy transformation of files, or you'll run a command that has plenty of parameters. Later on, you might want to revisit that command. You might think, did I pass the right parameters? What was the output of that command? Or maybe the command you ran did exactly the perfect thing and you want to run it again. With your standard command prompt, chances are your command and its output gets lost to the winds of time. There's some things you can do about that though.

Usually, on Windows, I tend to run my command prompt inside of another program called Cmdr. This program, Cmdr, gives you the ability to log your console output. Everything you type and all the output of the commands you enter can be logged to a file automatically. I usually set it up and forget it. One day, when you want to go back and see what the output of such and such a command was, you can go look at the console log to see what it says. The console log can be a messy best, and not too easy to read, but if you just want to see what some command was or what the output was, having that information there in the log can be useful, even if it's not as readable.

I wouldn't recommend trying to parse that console log automatically though. Well you can try if you want. Automation that involves parsing the console log can be a hairy proposition though.

There's other advantages to running your command prompt commands through Cmdr too. There's an extension library called Clink that enhances the capabilities of your command prompt. Let's say you have a complicated command that takes a lot of typing. Maybe you need to edit parts of the command in a non-linear fashion. You might think of writing your command in a text editor. Clink can help you there. You can type Ctrl-X Ctrl-E, then your editor is opened and you can edit your command. You'll have to define the EDITOR environment variable. You can use Clink without Cmdr, but if you get Cmdr you'll have Clink built in.

Other things you can do with Clink - you get a command history built in with it. If you press the F7 key, you'll see a list of commands that you previously typed. This is very useful when you just want to see all the things that you ran recently. You can even search the commands you ran. Just press Ctrl-R, then start typing something to search, you'll find previously run commands that were recorded in Clinks history. Very convenient.


There are no comments for this post.


Would you like to leave a comment?

Your email will never be shared nor sold with anyone. You can unsubscribe from the mailing list at any time. If you permit us to display your comment, you agree to permanently transfer ownership of its content to us, to display on this page indefinitely. In that case, your name and comment may be published, but not your email.