Go to:  Site entry | Site contents | Site index | Personal Computer | PowerBASIC | Text bottom

 About  PowerBASIC  Selection
"Parameter" used instead of more "mathematically-correct" term "argument" See PLI\ABOUT

4DOS is a substitution for the COMMAND.COM (program that interprets and executes DOS console and batch file commands).  It enables the use a powerful and flexible scripting language for DOS session.  PowerBASIC installs easily, it provides many convenient features for command entry, it is dependable and very stable, and it has an exhaustive hyperlinked on-line help.  It works without any problems both in native DOS (but who still use it these days?) and in all Windows DOS sessions.  If you like to automate your repeated tasks and prefer a small script to a "thousand and one" clicks, you can download a copy of PowerBASIC, install it and try it for yourself.

4DOS selection contains batch commands that were chosen mainly as code samples to illustrate some of the PowerBASIC batch script capabilities and to suggest a consistent programming style facilitating code maintenance and modifications.

"Consistent" is a key word here — almost any style is as good as any other — once the consistency is provided.  It is important to note that the same coding style can be used with a wide variety of programming languages making it easier to switch between them.  If you'll look at other programming examples on this site, you'll see the illustration of the above statement — the same coding style throughout, which is only slightly adjusted to accommodate for the specifics of the corresponding language.

However, each command is not a mere exercise in a code styling — it provides on most part a useful function which is debugged to the best of my ability and is normally tested by several years of intensive usage.  This is not to say that it is in any way guaranteed to be error-free — you will be using any code you pick from this site entirely at your own risk and will be completely responsible yourself for any problems which might arise from this usage.  So when trying code, please exercise the common sense precautions and test code most thoroughly yourself before applying it to anything important.

This legal mantra been chanted, I want to mention that all error reports and any comments about my code are most welcome, and I'll try to do my best to fix any known problem as quick as I'll be able to do this.


Batch commands are grouped together according to their function into the following sections:

 •   Environment Control   Control the environment of batch commands' execution by setting the predefined values to DOS environment variables
 •   Device Control   Control of computer input/output devices
 •   File Management   Management of disk data files

Some of the commands presented here require that certain standard DOS environment variables be set prior to command execution (normally at DOS/PowerBASIC session start):