The Dunyazad Digital Library

About the Library

The Reading Room

The Audio Wing

Support the Library

Other Stuff ...

Software

Opening Windows Console Windows

Here is a suggestion for how you can open console windows that are configured to suit your needs.

Let’s assume that you use an adequate file manager, like Total Commander, that includes a command line which operates in the currently active directory.

Let’s also assume that you have set up a directory for your little tools (for instance c:\mytools) and have included it in the system path.

Now, the obvious way to open a console window is to type cmd into Total Commander’s command line, but the drawback is that some things are difficult or even impossible to configure at the system level.

For instance: I want a minimalist command line prompt (simply >), but I also want to see the drive and path when I open a console window; also, I want to be able to easily configure and edit a few other default settings.

This is my solution:

Create two cmd files, cm.cmd and ~cmd.cmd (you can give them any names you like) which you put in your mytools directory.

This construct keeps the console window open after the configuration cmd file has been executed.

cm.cmd

rem opens console window, calls configuration cmd file

cmd /k ~cmd.cmd

~cmd.cmd

@echo off

rem to be called from cm.cmd

rem configures console window,

rem clears screen and displays current directory.

rem adapt to your own needs

chcp 1252

prompt $g

cls

cd

Adapt this configuration batch file acccording to your needs and preferences.

And from now on, open your console windows by typing cm instead of cmd.

You can still use cmd as before, of course (and you can also add cm.cmd to Total Commander’s start menu, and give it an icon on the button bar …)

---

Back to the “> Software” page