Windows/Win-OS2 Command Line Processor (WCL) -------------------------------------------- WCL is a Shareware program. ** REGISTRATION COSTS £15 (FIFTEEN POUNDS STERLING) or $23 (U.S) ** (c)1993, Dr. A. Olowofoyeku. Please read the "LEGAL STUFF" at the end of this file BEFORE using Windows Command Line. INTRODUCTION ------------ WCL is a command line interface program for Microsoft 3.x and IBM Win-OS2. The program simulates the infamous C:\> prompt of the DOS command line, but from within Windows. This is useful for those DOS hackers who find themselves having to use Windows for certain applications, or for those who want a very quick and easy way to multi-task Windows programs. From WCL, you can run all Windows and most DOS programs just by typing their name, and pressing as you do would at the DOS prompt for DOS programs. Multiple Windows programs can be run in this way. When you run a program through WCL, the program's window becomes the Active Window. You can go back to WCL by clicking on any part of the WCL window that is visible to you, and then run other programs from there. WCL will run in "SEAMLESS" mode under OS/2 version 2.x. With OS/2 version 2.1, you can run DOS, Windows, and OS/2 programs from WCL just by typing their names at the WCL command prompt. WCL is fully compatible with IBM Win-OS/2, and has been tested extensively under OS/2 2.1. OS/2 users should please NOTE that WCL will only run DOS and OS/2 programs under OS/2 as well as the Program Manager will run them, since WCL uses the same API calls to run programs as the Program Manager. Some OS/2 programs will not run at all, if run from a Win-OS/2 session, and some DOS programs behave quite strangely if run from Win-OS/2. A native 32 bit OS/2 port will be available in due course (see the "compiler" section at the end of this file). PATH ---- If the application you wish to run is not in a directory which is in DOS Path, you will have to supply the full path name (e.g. "C:\WPWIN\WPWIN", to run WordPerfect for Windows, if C:\WPWIN is not in the DOS Path). If the application is situated in a directory that is in the DOS Path, all you need do is type its name, and press (e.g. "WRITE" , to run Windows Write). NOTE: You can MOVE the WCL window to any position on the screen. By default, it is initially located at the top left corner. If you move it this way, it will remain in the new location until you move it or run WCL again. The default location can be changed by editing the file WCL.INI. See below for more on this. The last location of the window is saved if you quit WCL by pressing ESC or by typing "QUIT". STANDARD OR ENHANCED MODE: -------------------------- WCL will only run under Standard or Enhanced Mode Windows. This means that those with XT class machines will NOT be able to use it, and those with 80286 processors or higher will need to type "WIN /2" or "WIN /3" if their Windows setup does not default to Standard or Enhanced Mode. OS/2 users need not bother about this point since Win-OS/2 does not run in Real Mode. DEFAULT SETTINGS ---------------- WCL.INI contains the internal Default settings for the WCL window and environment, contained in the [wcl] section, as follows; [a] WINDOWLENGTH [b] LOCATION-HORIZONTAL [c] LOCATION-VERTICAL [d] WCL-PROMPT [e] SAVE-DESKTOP The settings in [b] and [c] above are updated each time you Quit from WCL by using one of its own commands (e.g., ESCape, "QUIT", "HALT", "EXIT", "CLOSE") or when you use the "SAVE" command. This means that you only need to move the WCL window to whereever you want it to always appear and then type "SAVE" to save those screen co-ordinates into WCL.INI. When you quit, the last location of the window will be saved, and when next you run WCL, the window will appear at its last position. The initial STARTUP programs for WCL (i.e the programs to run EVERY TIME WCL starts up, if WCL is your Windows Shell). These are contained in the [startup] section, as follows; [a] STARTUP1 [b] STARTUP2 [c] STARTUP3 [d] STARTUP4. As an alternative to using the lines, you can create a batch file called AUTOEXEC.CBF, containing all the commands that you would have put on the STARTUP lines. With the batch file, you are not limited to only 4 lines. The default setting for file copying is contained in the line [file-copy] section, as follows; CONFIRM-OVERWRITES=0 Settings for Directory Aliases are contained in the [directories] section, and the setting for backing up the Windows and Win-OS2 INI files is contained in the [backup] section. These items are all explained below; ----------------------------------- WINDOWLENGTH=50 (this is the length of the WCL window. You can reduce of increase the number from 50. Note that to have enough space for typing commands, 42 is the suggested minimum). LOCATION-HORIZONTAL=1 (** See note above on the new feature **) (this is the location of the LEFT HAND side of the WCL window. By default, this is the left edge of the screen. You can increase this if you want the window to be moved to the centre, or the right side of the screen for example. NOTE: assuming that the screen width is 80 characters, for a Standard VGA screen, multiply each character by 8. So, for the left side of the window to be moved to the CENTRE of the screen for example, you can put LOCATION-HORIZONTAL=320). The EFFECT of this setting depends entirely on the RESOLUTION of your screen. So for SuperVga modes (e.g.800x600; 1024x768) you will need to increase the multiplication ratio. Try experimenting! Note that when you change this setting, you have to allow for the length of the WCL window as set in WINDOWLENGTH (above). LOCATION-VERTICAL=1 (this is the location of the TOP of the WCL window. By default, this is set to the top of the screen. You can increase it if you wish to move the window DOWN, perhaps to the bottom of the screen. NOTE: assuming that the screen length is 25 lines, for a standard VGA screen, multiply each line by 19. So, to move the window to the bottom of the screen, you can put LOCATION-VERTICAL=475). ** NOTE **: This setting determines the TOP of the WCL window. The window itself occupies about 6 lines. So, you effectively have only 19 lines to play with. In the example given above, 475 is the 25th line of the screen. If you use that setting, you WILL NOT SEE any part of the WCL window (it the rest of it will be below the bottom of the screen). The safe setting for the bottom of the screen on VGA mode (640x480) is LOCATION-VERTICAL=361 For SuperVga modes, you again have to increase the multiplication ratio.) WCL-PROMPT=$P$G (This is the default mode of the WCL command line prompt. It displays the current Drive and Directory (like DOS). If this line is empty, then this is still the default prompt. If you wish to customise the WCL environment, you can change this setting. Anything after the "=" sign is taken LITERALLY and will appear EXACTLY as written. The only exception is "$P$G" which simulates the ubiquitous DOS prompt. So you can simulate the famous DBase "dot prompt" by putting on this line, "WCL-PROMPT=." You can also simulate the UNIX "%" prompt by "WCL-PROMPT=%" Alternatively, use your own name, "WCL-PROMPT=JOE BLOGGS>" (Note: The longer the prompt, the LESS space you have at the command line for typing commands) NOTE also that you can change the prompt at the command line at any time by using the "PROMPT" command. e.g. "PROMPT %" or "PROMPT ." This change will be saved into WCL.INI if you quit WCL through one of its own exit commands (e.g., "EXIT", "HALT", "QUIT") Please see further information on the PROMPT command below. That information is relevant to this setting in the INI file, especially if you want insert a space after your custom prompt. TEXT-COLOR= This setting determines the color of the text in the WCL windows. You can use any color here. TEXT-BACKGROUND= This setting determines the color of the background of the WCL windows. Although you can theoretically use ANY color here, practically, you have to use the same color as you use for your "wallpaper" setting (below). Notes: for TEXT-COLOR and TEXT-BACKGROUND ------------------------------------------ These settings should contain whole numbers (i.e., without decimals, or commas) that represent the colors that you want for the text and the window background respectively. Since users may be using any number of display cards and any number of screen drivers at any time, the color codes will vary significantly between systems. If you ever want to return to the default BLACK text on WHITE background, leave these settings empty, and WCL will use the defaults. Also, because of difficulties that users may face with the use of numbers, I have decided to support a number of non-numerical color codes which are constant on systems with 16 or more colors. The colors that you may specify by NAME for the text color and the text background are; cyan white black red green blue yellow magenta gray darkyellow These can be entered in uppercase or lowercase letters - it does not matter. If you want to use any color other than the above, then you have to use a numeric value that represents its color. Sorry, I can't help you further here. But if it helps, you can use hexadecimal values (ones that begin with $00, and then are followed by SIX values). C or Pascal programmers will be familiar with these. The six values that follow the $00 are RGB values, but used backwards (i.e., the first two for BLUE, the next two for GREEN, and and the last two for RED). "FF" turns the value to full intensity, and "00" turns the color off off. Any number between those two vary the intensity. e.g., B G R | | | $00FFFFFF = white $00FF0000 = blue $00808080 = gray WALLPAPER= This setting determines the color of the "brush" that Windows uses to paint the background of the main window. This can take one of 5 colors; black gray white gray lightgray darkgray NOTES: 1. This setting CANNOT take numeric values 2. You should use the same color here as you used for your text background, otherwise you will get very odd screens in all your WCL windows, and unsightly flashes in the BIGWCL main window. NOTE: The three above settings can be set either by manual editing of the WCL.INI file, or by using the new "COLOR" command, which writes the settings to WCL.INI for you. They then take effect when next you run WCL. The syntax is COLOR e.g., "COLOR yellow black black" SAVE-DESKTOP=0 (This setting *ONLY* has effect when WCL.EXE is your Windows Shell. If set to 0, then the desktop is NOT saved when you exit from WCL. If set to 1 (one) then WCL will save the current state of the Windows Desktop (i.e., all active programs) when you exit. The next time you run Windows, WCL will automatically restore the Windows Desktop to the position it was when you last quit from WCL (i.e., all those active programs will be run automatically). The desktop is saved in a file called "WCL.DSK" in the Windows Directory. This file is in a binary format, so please NEVER try to EDIT it with a text editor. You can of course delete it any time you want. NOTE: The Desktop will only be saved when you exit from WCL by using one of the WCL exit commands (i.e., "QUIT", "EXIT", "HALT", or pressing the ESCape key). If you exit by pressing Alt F4 or by selecing "Close" from the system menu, then the Desktop will NOT be saved. If you are fond of exiting Windows programs in these ways, then you can save the Desktop manually by typing "SAVE" at the WCL prompt, immediately before quitting. WINDOWLENGTH.BIG=75 This is the setting for the length (or width) of the BIGWCL.EXE main window. In order for the DIR/W command to work properly, this setting should be at least 75 (note: that DIR/W is not supported in WCL.EXE). WINDOWHEIGHT.BIG=25 This is the setting for the height of the BIGWCL.EXE main window. Any setting lower than 25 will be ignored. If you want a scroll back buffer in the BIGWCL main window, this setting can be increased - the higher the setting, the bigger the scroll back buffer (e.g., a setting of 250 will give a scroll back buffer of about 7 screens). This setting should NOT be higher than 300. Although you may get a bigger scroll back buffer with a setting of over 300, if the setting is too high, you may get general protection faults in Windows. 300 is a bit conservative as a maximum, but this gives a wide safety margin. LOCATION-HORIZONTAL.BIG=1 This is the location of the TOP LEFT corner of the BIGWCL window. LOCATION-VERTICAL.BIG=1 This is the location of the TOP of the BIGWCL window. BIGWCL-DEFAULT-FONT=0 This is the setting for the default font used in the BIGWCL window. When the DEFAULT-FONT is set to ZERO (default) then the System Fixed Font is used. Other possible values are; 1 (this means use the ANSI fixed font); 2 (this means use the OEM fixed font); 3 (this means use the default font for the screen device). Any other setting is ignored in favour of the default. STARTUP1= STARTUP2= STARTUP3= STARTUP4= (These are for indicating the programs to be loaded by WCL every time you start a WCL session. They are looked at *ONLY* if WCL is your Windows shell. If you retain Program Manager as your Windows shell, these lines are COMPLETELY IGNORED. WCL does not load the programs in your Windows start up group file, and this is the way of compensating. So if for example, you want CONTROL.EXE to be loaded every time you start WCL, you can put "STARTUP1=CONTROL.EXE". If the programs are not in the DOS path, then you have to type in the FULL PATH of the program (e.g. "STARTUP2=D:\MYDIR\MYPROG\MYPROG.EXE"). NOTE that the program name/path must not exceed 78 characters, or it will be truncated. Only 4 start up programs are supported here. If you must have more than 4, then put one on the line that reads "RUN=" and one on the line that reads "LOAD=" in your WIN.INI file. Alternatively you can create a WCL batch file (e.g., "STARTUP.CBF") and include its name in one of the startup lines. With such a batch file, you can load as many programs as you wish. ** NOTE **: The programs contained on the start up lines will be loaded EVERY TIME that a WCL session is commenced. So, if for any reason you are running multiple copies of WCL, EACH copy will load all the programs. So it is better to leave those lines as they are until you have finished configuring WCL for your system. If you are likely to want to run multiple copies of WCL, do not add anything to these lines). CONFIRM-OVERWRITES=0 This sets the behaviour of the File Copy routines. When set to 0 (zero; this is the default) existing files will be overwritten by the versions being copied, WITHOUT WARNING (this is like the DOS Copy command). If set to 1 (one) then you will ALWAYS be prompted for confirmation before an existing file is overwritten. NOTE: The WCL.INI file is polled for this setting only ONCE (when the program is loaded) so any change you make to this setting will take effect only after you run WCL again (or if you run another copy of it by typing "WCL" at the prompt, and Close the original copy) BACK-UP-THE-INIS=1 This specifies whether WCL should make backup copies of your WIN.INI and SYSTEM.INI files every time Windows is loaded. This line is only effective if WCL is your Windows Shell. A setting of 1 means do the backups, and any other setting will mean that WCL will skip the backups. ** IMPORTANT NOTES ** --------------------- [1] There must be NO SPACES AT ALL between the entries on each line. e.g "WINDOWLENGTH = 50" is NOT valid because there are spaces both before and after the "=" [2] The responsiblity for suppying correct and sensible values for these window co-ordinates is TOTALLY YOURS. The default settings are quite adequate for most needs, and you can always re-locate and re-size the window using your mouse. [3] If WCL cannot find the file WCL.INI at startup time, then the default values explained above will always apply. [4] The WCL.INI file is only read ONCE - when WCL is loaded. If you change any thing in the file, you will have to close and restart WCL for the changes to take effect. The only exception to this is with respect to directory aliases. When you use the "GOTO" command, WCL searches always WCL.INI for an alias for the name you supply. [5] If you are experimenting with different settings for the WCL window, there is nothing to stop you from testing your settings on another copy of WCL. You can run another copy of WCL by typing "WCL" at the prompt. You will then see another copy loaded, and reflecting the window co-ordinates in the current version of WCL.INI. NOTE that if you have not changed the window coordinates, then the other copies of WCL will have their windows right on top of the current copies. [6] If WCL is NOT your Windows shell, then the Start Up lines and SAVE-DESKTOP setting in WCL.INI will be ignored. SUPPORTED PROGRAMS ------------------ All Windows programs can be run from within WCL. This includes DOS programs for which a Windows .PIF file exists. Most DOS programs can also be run directly from WCL without creating a PIF file for them. In this case, they will run in full screen mode. Note that most internal DOS commands (i.e, those that are resident in COMMAND.COM) can NOT be run directly from WCL. However, a number of DOS-like commands are supported through built-in technology. Below is a list of them; [1] CD or CHDIR (change directory) [2] MD or MKDIR (create a new directory) [3] RD or RMDIR (remove/delete a directory) [4] DEL or ERASE (delete files. Wild cards are accepted) [5] REN or RENAME (rename one file; Note - You CANNOT use wildcards!) [6] COPY (copy files. Wild cards are accepted. NOTE: You can create an ASCII file with "COPY CON ", just as under DOS (e.g., "COPY CON LOADWCL.BAT"). This is useful for quick creation of TEXT FILES from within Windows without loading the NOTEPAD, or any other Text Editor. When the "COPY CON command is invoked, an Edit Window is opened for the text to be typed in. Each line is NUMBERED by WCL, so you can know how many lines you have left (a MAXIMUM of 100 lines of text is permitted, and each line cannot be more than 128 characters in length). NOTE that the editor is a LINE EDITOR, just as in the DOS command line. Each linr must be terminated by a Carriage Return and you CANNOT go back to edit previous lines. When the editing is complete, type a period or full stop (".") on a line by itself, or type "end" on a line by itself to finish. It is at this point that the file is written to Disk. The Lines Numbers supplied at the edit screen by WCL will NOT be written into the file, neither will the "end" or the period "." which inform WCL that you have finished editing. NOTE: That you can also copy a file to the printer. "LPT1" and "PRN" are the only printer ports supported. e.g. "COPY COMMANDS.SUM LPT1" This will cause the file COMMANDS.SUM to be printed. [7] TIME (show current system time) [8] DATE (show current system date) [9] SET (show SOME enviroment variables. Note that this only shows a specified number of variables, and that unlike the DOS equivalent, you cannot change any of them) [10] PROMPT (Change the WCL prompt. By default, the prompt shows the current directory until you change it via this command, or you put something on the "WCL-PROMPT" line in WCL.INI. e.g. "PROMPT FRED>" this will change the prompt to "FRED>" ). If you want a space to appear after your prompt, add a hash ("#") to the end of the prompt. e.g. "PROMPT FRED>#" this will change the prompt to "FRED> ") To return the prompt to one that shows the current directory, type "PROMPT $P$G". Any prompt that is not $P$G is taken literally. No other "$" setting is supported. Please note this fact. Note: you should NOT use the hash for "$P$G" [11] TYPE or MORE (display the contents of an ASCII file, 20 lines at a time. Note that you should not put the "<" charac- ter before the file name (unlike DOS). e.g TYPE MYFILE.TXT or MORE HELLO.DOC (not "MORE switch. /OD = sort by date /OE = sort by extension /OS = sort by size Note that the directories are ALWAYS sorted by name. These switches only apply to normal files. Other switches are; /W = use wide list format (valid only in BIGWCL) /S = list matching files in all subdirectories (cannot be used in addition to any other switch, files are NOT sorted at all, and the output cannot be redirected to a file or the printer) NOTE: The DIR command shows in its first column the attributes of each file in the directory, enclosed within "<>" H stands for Hidden S stands for System File R stands for Read Only A stands for Archive (i.e, normal file) DIR stands for Directory (i.e, this is a sub-directory) N/A stands for "No Attribute" If a file has more than one attribute, they are all listed e.g. for the DOS system files. Like with the DOS equivalent, the output of the 'DIR' command can be redirected to a FILE or to the printer (LPT1) with ">" e.g. DIR *.EXE > EXEDIR.TXT (output to a FILE) DIR C:\WINDOWS > LPT1 (output to the PRINTER) NOTE: If you use redirection, make sure there is a space both before and after the redirection sign ">" (as in the examples above). If you do not insert a space (e.g. "DIR *.EXE>EXEDIR.TXT") you will probably only get an error message. Note that you can use the UNIX names of some of these commands e.g. CP for COPY MV for RENAME RM for DELETE CWD for CHANGE DIRECTORY LS for DIRectory listing These commands operate more or less like their DOS equivalents, except that you cannot use wild cards in the RENAME function. For file copying, wildcards are accepted for SOURCE file specifications only. You cannot use wildcards in TARGET file specifications. e.g COPY *.DOC A:\MSDOS - This is valid COPY *.DOC A:\MSDOS\*.BAK - This is invalid. REN *.DOC *.TXT - This is invalid NOTE: Both the COPY and DIR commands produce their own Windows on the screen. The COPY function tries to ensure that there is enough space on the destination drive for the files to be copied, on a file-by-file basis. If there is insufficient space for a file, there will be an error message to that effect, but the function will then proceed to try and copy any other file listed for copying. This is better than DOS in that DOS terminates the COPY function when there is insufficient space for ANY file, even if there are smaller files that will fit into the the target drive. WCL will copy these smaller ones. The COPY function also tries to verify that the actual number of bytes copied are equal to the size of each Source file. If there is any dis- crepancy in the sizes of the copied file and it's copy, there is an error message informing you of this, and the copy is deleted. The DIR window show can be RESIZED and MOVED, and there is nothing to stop you from having many DIR windows open. It's quite a straight- forward matter to ensure that only one copy of DIR is running, but I am convinced that there are good reasons for allowing multiple copies. You can compare the contents of two directories by having DIR windows of both of them on screen, for example. Other DOS commands ------------------ Apart from changing drives (e.g. "A:" to change to drive A or "D:" to change to drive D, etc.,) INTERNAL DOS commands different from those listed above cannot be directly run from WCL. Attempting to run them will either produce an error message from Windows, or lead to the DOS prompt being invoked through a DOS Shell. External DOS commands (i.e, those which have their own .EXE, .COM, or .BAT files, e.g "FORMAT", "GWBASIC", "XCOPY", etc.) can normally be run directly from WCL. However, I would not attempt to run programs such as "CHKDSK" or programs which access the hardware directly (such as disk compressors) when in Windows. A lot of grief can result from this. Basically, any DOS program which can be used safely under Windows can be used safely in WCL since everything that WCL does is done through Windows API calls (i.e. Windows itself does all the actual processing. WCL only acts as a command line interface between you and Windows). If there is any program which you should not run under Windows, then please do NOT attempt to run it via WCL. WCL COMMANDS ------------ WCL provides a few Internal Commands which you can type at the prompt; [1] "HELP" - Load the Help file WCL.HLP in Windows Help. or "H" or "?" Alternatively, - Run the Windows NOTEPAD with this file loaded. "HELP2" or "H2" or "SUM" or "??" [2] "EXIT" - EXIT from WCL and returns you to the Program Manager, or "QUIT" or to DOS if WCL is your Windows Shell. or ESC (i.e. press the ESCAPE key) [3] "HALT" - SHUT DOWN WINDOWS, and return to DOS. or "CLOSE" Use with care, as you may lose any unsaved work. If all active programs co-operate, there will be an orderly SHUTDOWN by WINDOWS, and most programs WILL prompt you to save any unsaved work. If some programs refuse to permit the SHUTDOWN, there will be no shut down at all. i.e. nothing happens. [4] "RESTART" - SHUT DOWN WINDOWS and RESTART WINDOWS AGAIN. This or "WIN" command is only available if you are using Windows 3.1. It is useful after changing some system settings in WIN.INI or SYSTEM.INI and you want those changes to take effect by re-running WINDOWS. This saves you having to EXIT Windows, and then typing "WIN" again at the DOS prompt. If WCL detects Windows 3.0, it disables this command. Trying to use it in such a case will only lead to an error message. [5] "CONFIGURE" - Run NOTEPAD.EXE with SYSTEM.INI, WIN.INI and WCL.INI. or "CHANGE" loaded. You can then change the settings in these files. or "CHG" NOTE: DO NOT change anything in SYSTEM.INI or WIN.INI if you do not know what you are doing, and definitely NOT WITHOUT BACKING UP the files first. A lot of grief can be caused by messing around with SYSTEM.INI or WIN.INI!!! [6] "CHG2" - this runs NOTEPAD with only WCL.INI loaded. or "WCLINI" [7] "WINSHELL" Change the "SHELL=" setting in SYSTEM.INI. The command takes one parameter (i. e., the new Windows Shell). If no parameter is supplied, the name of the current Windows Shell is presented. [8] "WINRUN" Change the "RUN=" setting in WIN.INI. The command can take more than one parameter, each of them separated by spaces. The supplied parameters will replace the ones currently on the "RUN=" line. If all you want to do is to ADD extra programs to the "RUN=" line (as opposed to REPLACING the current one) then put a "+" sign BEFORE the first parameter e.g., "WINRUN + DRWATSON.EXE WRITE.EXE" = this will ADD the two named programs to any one that is currently there. (If no parameter is supplied, the current setting is presented). To delete all the settings on the line, type "WINRUN NIL". [9] "WINLOAD" Change the "LOAD=" setting in WIN.INI. The command can take more than one parameter, and operates exactly like the WINRUN command above. [10] "ABOUT - Show the infamous Windows "ABOUT" message for Windows or "ID" Command Line. or "VER" [12] "SAY" - Print a message in a box on the screen. This box will not let you do anything else until you click on "OK" or press . e.g "SAY Insert a Disk into Drive A" This will show a message box telling you to insert a Disk into drive "A". When you press or click on "OK" then the box disappears. Otherwise, you cannot do anything else in Windows. This feature is useful in batch files (see below) and is thus a bit like the DOS "PAUSE" command. [13] "HIDE" - Set the attributes of a file or a group of files to or "CONCEAL" HIDDEN. This means that they will not be revealed if you type "DIR" from DOS (typing "DIR" at the WCL prompt will show them). You can use wildcards. e.g "HIDE *.DOC" [14] "UNHIDE" - Set the attributes of the file to ARCHIVE. This is the or "REVEAL" standard file attribute. Note that no matter what the initial attribute was, the file(s) WILL be set to archive. So do not use wildcards unless you are sure that you want to turn off all the other attributes on all the specified files. [15] "MIN" - Minimize (iconise) the currently active Window. or "ICON" [16] "FREE" - Show the amount of Free Disk Space on a specified drive. If no drive is specified, it will show the free spacce on the current drive. Invalid drives will return 0 or -1 examples "FREE A:" - show free space on drive A (in bytes) "FREE" - show free space on this drive [17] "BEEP" - Make that annoying beep sound. Useful if you want to draw attention when running a .CBF batch file. Can be put to good use along with "SAY". [18] "DOS" - Shell to the DOS command line. You need to type "EXIT" at or "SHELL" the DOS prompt to return to Windows. Ensure that you do not use disk utilities such as CHKDSK, etc., when you shell to DOS in this way, otherwise, a lot of grief WILL be caused. [19] "SETTIME" - Change the SYSTEM TIME. The Format is Hh:Mm:Ss where Hh = Hours Mm = Minutes Ss = Seconds e.g. SETTIME 14:08:55 - set the time to 2.08 pm, and 55 seconds. [20] "SETDATE" - Change the SYSTEM DATE. The Format is Dd/Mm/YYYY where Dd = Day Mm = Month YYYY = Year e.g. SETDATE 25/8/1991 - change date to 25 August 1991 [21] "GOTO" - Change to a directory for which an ALIAS has been created in WCL.INI. Create ALIASES under the "[Directories]" part of WCL.INI. This command enables a user to change to long directory paths easily. e.g. if the line "SYS=C:\WINDOWS\SYSTEM" exists in the "[Directories]" part of WCL.INI, typing the command "GOTO SYS" will cause WCL to change to C:\WINDOWS\SYSTEM. [22] "SEEK" - Look for files matching a filespec. or "LOCATE" It searches all the directories on the drive, and lists any matches that were found. This command can now accept wildcard characters. "LOCATE WINWORD.EXE" - will look for all occurences of WINWORD.EXE. "LOCATE WP*.*" - will look for all files matching this specification. [23] "LPR" - Send a file to the Printer port (LPT1). The file is sent or "LPT" in its true Binary format. This is the same as using the DOS or "PRINT" "COPY /B LPT1" command. [24] "SAVE" - This tells WCL to save the current state of the Windows Desktop. All the active programs are saved in WCL.DSK, in the Windows directory. If WCL.EXE is your Windows Shell, the saved desktop will be restored when you next run Windows. [25] "ADD" - Add the contents of one file to another. The syntax is or "CAT" thus; "ADD " or "CONCAT" e.g. "ADD SECOND.TXT FIRST.TXT" will append or add the contents of SECOND.TXT to FIRST.TXT. This means that after the operation, the file FIRST.TXT will now contain both the original contents of FIRST.TXT, with the contents of SECOND.TXT. If for Example, FIRST.TXT originally contained "ABC" and SECOND.TXT originally contained "DEF", after the ADD operation, FIRST.TXT will now contain "ABCDEF". The contents of SECOND.TXT remain unchanged. Always remember that the SECOND file to be specified is the file that will be ADDED to and that what will be added to it are the contents of the FIRST file to be specified. Note: You CANNOT use wildcards in this command. [26] "TYPEWRITE" - This takes WCL into "Type Writer Mode". You are or "TYPE-WRITE" presented with an Edit Window wherein you can type text. When you press the LINE of text is sent to the printer ("PRN"). This command thus turns your Windows and Printer into a pretend Electric Typewriter. You can type as many lines of text as you wish, but bear these in mind; [a] Each line must terminate with a carriage return [b] Each line must not be more than 78 characters long [c] You can have empty lines, just by pressing [d] This command will NOT work properly with Page Printers (i.e., Laser printers). This is because lasers print one page at a time, and not line by line like dot matrix, inkjet, and daisy wheel printers. To EXIT from typewriter mode, just type "END" on a line by itself, or a full stop "." ("period" in American) on a line by itself. [27] "UPDATE" - This reads certain items from the initialisation file (WCL.INI) into memory for use in the current session. WCL normally reads the file only once - when it is loaded. Certain things may be changed during use which will not normally take effect until you quit WCL and start again. The "UPDATE" command is to remedy this situation by making some of the changes to WCL.INI settings effective immediately after running the command. The settings updated with this command are; [a] THE WINDOWS SHELL (certain settings are ignored if WCL is NOT the Windows Shell. So if you edit SYSTEM.INI to change the Shell either TO or FROM WCL, you need to use the UPDATE command so this will take effect straight away. However, if you change the Windows Shell with the "WINSHELL" command, you need not use this command here. [b] WCL-PROMPT [c] SAVE-DESKTOP (this setting determines whether WCL will save the present state of your Windows Desktop when you quit from WCL. Only effective if WCL is your Windows Shell). [d] CONFIRM-OVERWRITES (this dertermines whether you are prompted BEFORE an existing file is over-written when you use the COPY command). [28] "ALIAS" - VIEW the current list of Directory Aliases in WCL.INI (the first 20), or CREATE a new Directory Alias, or CHANGE an existing one. If the command is used without any parameter, a list of current Aliases is presented. To CREATE a new alias, or CHANGE an existing one, use ALIAS e.g. ALIAS BACKUP C:\DOCUMENTS\SECRET\BACKUP [29] "ATTRIB" - VIEW and/or CHANGE the attributes of a file or a group of files. To VIEW the attributes of a file, use ATTRIB You cannot use wildcards if the ATTRIB command is used in this way. To CHANGE the attributes of a file or files, use ATTRIB You can use wildcards when the ATTRIB command is used in this way. The ATTRIBUTES are represented by R for READ ONLY; S for SYSTEM FILE; H for HIDDEN; A for ARCHIVE. You turn them ON or OFF by supplying a plus (+) or minus (-) AFTER the attribtutes. e.g ATTRIB +RH HIDDEN.DOC (set HIDDEN.DOC to Read Only and Hidden) e.g. ATTRIB -RS +HA SYSTEM.DOC (set SYSTEM.DOC to Hidden and Archive, and remove the Read Only and System settings) [30] "!" or "!!" - access command line history - (see below) [31] "LIST" - show a list of the last 20 commands (see below) or "HISTORY" [32] "COLOR" - change the color settings for text-color, text-background, or "SETCOLOR" and wallpaper, in WCL.INI. The command takes 3 parameters which determine each of the color settings. The settings that you specify are written to WCL.INI and will take effect when next you run WCL. The available colors are discussed in relation to the INI file settings, above. e.g., COLOR black white white [33] "GETCOLOR" - show the current color settings for TEXT-COLOR, or "GETCOLORS" TEXT-BACKGROUND, and WALLPAPER, in WCL.INI. An alternative command is GETCOLORS. [34] "CLS" - clear the screen. In WCL, this does nothing. In BIGWCL, it clears the screen, INCLUDING the contents of any scroll-back buffer. [35] "DELTREE" - This command attempts to delete ALL the files in a given diretory tree. This includes all the files in that directory, and in its subdirectories. It then attempts to erase all the subdirectories in that directory tree. NOTE: I have implemented this command against my better judgment, because users demanded it. I do not think that deleting files should be made easy, since recovering them again may be impossible. In my opinion, DELTREE is a command that is best left well alone. If anybody proceeds to use it, I am cannot accept any responsibility for any loss of data that may ensue. Because of the drastic nature of what DELTREE does, I have imposed some limitations; 1. You will be asked to confirm TWICE that you wish to proceed. 2. You must supply the name of a valid directory to the command. Just typing "DELTREE" will be rejected. You need to type something like "DELTREE D:\JUNKMAIL" 3. The command will reject any attempt to apply it to the ROOT directory of any drive. e.g., "DELTREE \" or "DELTREE C:\" these will NOT be accepted. 4. If there is any problem with deleting any file at all, then the process will abort. COMMAND LINE HISTORY -------------------- WCL supports a limited form of command line history by keeping a record of the LAST 20 commands typed at the prompt. There are a number of commands for accessing the history function !! - (two exclamation marks) - this will execute the most recent command. ! - (one exclamation mark) - If this is typed by itself, WCL will list the last 20 commands (each of them with a number) in a message box. When the message box is closed you are prompted for the number of the line that you want to execute. The command is then reproduced. At this stage you can run it by pressing or you can edit it. If you do not want to execute any of the listed commands, type 0 (zero) or just press If the single exclamation mark is followed by a space and then a number (e.g., ! 10), WCL fetches the command with that number (if any exists). Thus for example, "! 6" means fetch the sixth to the last command. LIST - Show a numbered listing of the last 20 commands typed at the WCL prompt CLEAR - Clear the command line history list. This gets rid of all the entries present on the list of the last 20 commands. The list will then start to build from the scratch. It is a great way to stop prying eyes (e.g., the boss) from seeing what commands you have been typing all day. Note that if you are using BIGWCL and you have a big scroll back buffer, it is still possible to scroll back and see what you have been typing. BATCH COMMANDS IN WCL --------------------- WCL supports sequential processing of commands by allowing you to put commands into a BATCH FILE. This batch file must have ".CBF" as its extension. "CBF" stands for "Command Batch File". e.g "COPYBAK.CBF" Batch files can contain any command that WCL supports - ie. internal WCL commands, DOS .BAT, .EXE and .COM programs, and Windows programs. The file batch file must be in ASCII format, and each command must be on a separate line. Each batch file can be up to 20 lines in length. However, it cannot contain another .CBF file. Once set up, all you need to do is to type the name of the batch file at the WCL prompt. You do not need to type it's extension. With the example above, you only need to type "COPYBAK". WCL will then try to execute the commands in the file on a line-by-line basis. This may result in some interesting screen maneouvres as each program is given the input focus by Windows, and tries to display its messages and main window. Remember that Windows programs do not have the whole PC to themselves, unlike DOS programs, so each Windows program will allow another to be immediately loaded after it, as soon as it sets up its main window. If the batch file contains a mixture of DOS and Windows programs, the screen maneuovres are yet more interesting. The import of this is that the processing of batch commands in Windows will not always be as you expect, if looked at from a DOS batch file point of view. This is due to the nature of Windows itself, and there isn't much that I can do about it. If WCL is your Windows Shell, then you can put any command that you wish to run every time you start Windows in a WCL batch file with the name AUTOEXEC.CBF. If WCL is not your Windows Shell, this file is ignored. You can now pass parameters to your WCL batch files, just as in DOS. To do this, use "%1" as you would in DOS. This feature is still quite new, but it has worked well so far in my tests. You will have to experiment to see what works in this regard. Please use this only for the purpose of passing parameters to external programs. Do not use it for WCL's internal commands. Note: WCL can only process a maximum of 3 parameters in this way (i.e., %1, %2, and %3). NOTE: ---- Please ensure that batch files do NOT have the same names as any DOS or Windows program file that you will call from the batch files. For example, if you will call KERMIT.EXE from you batch file, make sure that the batch file is not called KERMIT.CBF - if you do not heed this advice, you are SURE to get a SYSTEM CRASH when you try to run the batch file. Please note this warning. Example of a .CBF file's contents; Say This is a test .CBF file CD C:\WINDOWS COPY *.INI A:\ CD C:\DOCS\LETTERS COPY *.LET A:\LETTERS Say I have finished the back ups This file starts by printing a message that it is a test .CBF file. It then backs up all the .INI files in the Windows directory, and all the .LET files in the C:\DOS\LETTERS directory. It finishes by telling you that its has completed the back ups. "SAY" messages may actually appear BEFORE the operations which they claim to have completed. This again is due to the nature of Windows. NOTE: It is YOUR responsiblity to ensure that the commands in each batch file are valid. **** IMPORTANT NOTE **** ------------------------ Whether or not WCL is your Windows Shell, it is always better to close WCL by typing in one of the exit commands described above (i.e. "QUIT", "EXIT", "CLOSE", "HALT"). Although you can always close WCL by pressing Alt F4 or selecting "Close" from the menu, you will NOT GET ANY WARNING if you use these methods. On the contrary, you WILL ALWAYS GET A WARNING if you use any of WCL's exit commands. WINDOWS SHELL ------------- You can use WCL as your Windows SHELL (instead of the Program Manager) by editing your SYSTEM.INI file. Find the line which says "SHELL=PROGMAN.EXE" and change it to "SHELL=WCL.EXE". This will ensure that WCL is loaded automatically every time you run Windows, as the default shell. If WCL becomes you Windows Shell, it will still try to execute the programs contained in the "RUN" and "LOAD" lines in the WIN.INI file. Alternatively, you can edit the WIN.INI file by putting WCL's name on the line that says "RUN=" e.g. "RUN=WCL.EXE". This keeps the Program Manager as the shell but loads WCL every time you run Windows. FREE RESOURCES -------------- WCL displays a line above the prompt which show how much free System Memory is available to the last program that has been loaded. This figure is roughly equal to what the Windows Program Applets will display when you select the "ABOUT" menu option. The display is NOT automatically updated after you close an application unless you press at the WCL prompt. In Windows 3.1 it also shows how much System Resources is left after each application is loaded. Again, this is roughly equal to what you will see when you select the "ABOUT" menu option in the Windows Applets. There may be some variation in the amount of free resources both before loading and after closing an application. This is partly because many Windows applications do not free up all the memory that they took up when they were loaded, and partly because of "holes" being left in the Windows heap by some programs. You get the same problem when you use the Progam Manager as your Windows shell. LICENCE ------- WCL is distributed under the Shareware principle. The program can be copied and distributed freely, as long as ALL the supplied files, including documentation (this file) are included, and NO ATTEMPT is made to modify any of the files. The program may not be supplied or bundled with any COMMERCIAL application without prior WRITTEN permission from me. "Commercial" does NOT include Shareware, Freeware, or Public Domain programs. WCL may be bundled freely with Shareware, Freeware and Public Domain programs. All I require in these cases is a letter or Email message informing me of what program(s) you have bundled WCL with. The Shareware principle means that you get a chance to EVALUATE the program free of charge for a reasonable period of time (usually 30 days). It does not mean that you will NOT have to pay for the program. If you find WCL useful and would like to continue using it then you are requested to please REGISTER your copy with the author. *********************************************************** *** REGISTRATION COSTS £15 (Fifteen Pounds Sterling) ** or $23 (Twenty Three U.S. Dollars) ** *********************************************************** Users from outside the United Kingdom should please an International Money Order. Otherwise, if sending cheques drawn out in currencies other than Sterling, please add £5 (Five Pounds Sterling) to cover bank charges. Thus, for example, if you are sending a cheque that is drawn on a bank in the U.S.A, you need add $7.50 to the registration fee to cover U.K. bank charges (meaning $US30.50 in all). Please note that the extra £5 is COMPULSORY if you are sending a cheque that is not drawn out in Sterling. REGISTRATION will entitle you a copy of the most current version, minus the Registration messages. You will also receive copies of other Windows Shareware and Public Domain programs written by the me. Note that there is no printed manual. If you wish to Register your copy, please send the payment to; Dr. A. Olowofoyeku, 268 Horwood, Newcastle, Staffordshire, ST5 5BQ ENGLAND. Please specify floppy disk size (3.5" or 5.25"). You can print the file REGISTER.TXT by typing "PRINT REGISTER.TXT" at the WCL prompt, and then fill it in. COMPATIBILITY ------------- The only apparent incompatibility that I know of is an obscure one involving RAMDRIVE.SYS when it is used with the /E swtich. It is obscure because the problem only arises when ALL the following conditions are present; [1] A RAM disk is present on the system AND [2] The RAM disk driver is RAMDRIVE.SYS AND [3] XMS memory is being used for the RAM disk AND [4] Windows 3.1 is being run in ENHANCED MODE AND [5] A TEMPORARY Swap File is being used AND [6] WCL's "FREE" command is invoked to determine the free disk space on a FLOPPY DISK DRIVE in the following order; [a] First, type "FREE" [b] Then type "FREE A" or "FREE B" WCLDLL.EXE causes a general protection fault in these circumstances; This problem does not occur when there is no RAM disk, or when RAMDRIVE.SYS is being used in conventional memory. It does not occur in Standard Mode Windows, or in Enhanced Mode Windows when a permanent Swap File is being used. I have so far been unable to figure out why this happens, but I do believe that it is the result of a clash between RAMDRIVE.SYS and Windows 3.1's 32 bit accesses to the temporary Swap File. The problem is actually quite minor. Its only consequence is that in the obscure circumstances in which it occurs, you may not be able to use WCL's "FREE" command to obtain information about the free space on your FLOPPY disk drives. Feedback -------- I have tested WCL extensively and I personally use it as my Windows shell. As far as I know, all bugs have been ironed out (apart from the problem with RAMDRIVE.SYS outlined above). However, I am aware that there may well be bugs or incompatibilities which I have not been able to discover. If you find any, please feel free to write to me about it. Please include a full description of the problem, and whether it can be reproduced. Also include the contents of your AUTOEXEC.BAT and CONFIG.SYS and WIN.INI and SYSTEM.INI files. If you encounter the problem while running WCL under Win-OS/2, please indicate whether the problem occurs in a seamless session, a full screen session, or both. LEGAL STUFF ----------- The WCL program is supplied AS IS, without ANY WARRANTIES WHATSOEVER. I will accept NO RESPONSIBILITY for any loss or damage, financial or otherwise, consequent upon the use or purported use of WCL for any purpose whatsoever. If these terms are NOT acceptable to you, then you have no licence to use or test WCL. You should DELETE the program from your disks immediately. COMPILER -------- For those who care to know, WCL was written entirely in Borland's Turbo Pascal for Windows. When Borland releases an OS/2 version of Turbo Pascal, I plan to undertake an immediate port of WCL to 32 bit OS/2. Watch this space! ******************************************************************** For comments, suggestions, and REGISTRATION, please write to; Dr. A. Olowofoyeku, 268 Horwood, Newcastle, Staffordshire, ST5 5BQ ENGLAND. OR Email me at; laa12@seq1.keele.ac.uk (note that all these are lower case letters) *******************************************************************