Chapter 4. Using MS–DOS

This chapter describes the original operating system for PCs, called MS-DOS, which is available from within Windows 95. This chapter explains the basics of how MS-DOS works and how to use it.

Running MS-DOS

To display the SoftWindows MS-DOS window from Windows 95

Click Start, then choose MS-DOS Prompt from the Programs submenu on the Start menu.

To exit from Windows 95 to the SoftWindows MS-DOS window

  1. Click the Start button, then click Shut Down….

  2. Select Restart the computer in MS-DOS mode.

  3. Click Yes to proceed.

MS–DOS basics

MS–DOS lets you give commands by typing instructions at the MS–DOS C:\> prompt.

MS–DOS editor

MS–DOS includes a simple screen editor which you can use to create, edit, and print plain text files. You can choose editing commands from menus and edit text using the mouse. The MS–DOS editor is particularly useful for editing MS–DOS batch programs such as AUTOEXEC.BAT and other files such as CONFIG.SYS.

EDLIN, the less powerful line editor provided with earlier versions of MS–DOS, is also provided.

For more information

For more information about using MS-DOS we recommend the following books:

  • Microsoft MS-DOS User's Guide

  • DOS for Dummies by Dan Gookin, from IDG Books

Getting help on MS-DOS

MS-DOS includes a comprehensive help system which you can use to display information about MS-DOS commands, and the procedures for using MS-DOS.

To display information about an MS-DOS command

Type the following at the C:\> prompt:

command /? 

where command is the name of the command.

For example, to get help on the DIR command type:

DIR /? 

Using the SoftWindows MS-DOS window

To resize the SoftWindows MS–DOS window

You can resize the SoftWindows MS-DOS window to one of three alternative fixed sizes, 1.0x, 1.5x, and 2.0x, up to the size of your workstation screen.

Drag the window by any of its resize corners.

When you release the mouse button the window will snap to the closest fixed size.

Status bar

The status bar shows the status of SoftWindows using the following indicators:

Table 4-1. Status Bar Indicators

Indicator

What it means

A:/B:

Floppy disk drive A:/B: is in use

Caps Lock

Caps Lock mode is selected

Scroll Lock

Scroll Lock mode is selected

Num Lock

Num Lock mode is selected

SVGA

The display type

MSW

SoftWindows graphics driver is in use for Microsoft Windows.


Using the mouse in MS-DOS

If you have a mouse attached to your computer, it will be automatically attached when you run Windows applications. You can also use it with MS-DOS programs that support a Microsoft Bus mouse by using the SoftWindows Attach Mouse command.


Note: Before you can attach the mouse ensure that MOUSE.COM has been started, either from the AUTOEXEC.BAT file (the command is commented out by default), or by entering the following command at the MS-DOS command prompt:


C:\> C:\INSIGNIA\MOUSE.COM 

To use the mouse in MS-DOS

You can attach the mouse from the keyboard as follows. Hold down Ctrl-Alt and click the middle mouse button (or both buttons on a two-button mouse).

When you attach the mouse the workstation mouse disappears. The SoftWindows menus will be inaccessible, and you cannot access X Windows windows belonging to other UNIX applications.

To restore the normal workstation mouse

Hold down Ctrl-Alt and click the middle mouse button (or both buttons on a two- button mouse).

Using the MS–DOS editor

To run the MS–DOS editor

Type the following command at the C:\> prompt:

EDIT filename 

where filename is the name of the file you want to edit, or omit the filename to create a new file.

For example, to edit the AUTOEXEC.BAT startup file type:

EDIT AUTOEXEC.BAT 

The file will then be displayed in the MS–DOS editor window.

To use the mouse

Choose Attach Mouse from the Actions menu.

Ensure that MOUSE.COM has been started before you attach the mouse.For more information refer to “Using the mouse in MS-DOS.”

To edit the file

  1. Position the cursor using the arrow keys or by moving and clicking the mouse.

  2. Type to insert text at the cursor.

To cut, copy, and paste text

  1. Press and drag the mouse pointer over the text you want to cut or copy.

  2. Use the Cut, Copy, Paste, and Clear functions from the MS-DOS editor's Edit menu.

To delete text

  1. Press and drag the mouse pointer over the text you want to delete.

  2. Press d or type the text you want to replace it.

To exit from the MS-DOS editor

  1. Choose Exit from the editor's File menu.

    You can do this from the keyboard by typing A, F, X.

    You will be prompted to save the file before exiting if you have made any changes to it.

  2. Click Yes, or press <Enter>, to save the changes and exit from the MS-DOS editor.

Using MS–DOS commands

You can type MS–DOS commands at the MS-DOS prompt as you would on a real PC.

The following list gives the most useful MS–DOS commands; refer to an MS–DOS reference guide for more detailed information.

In the syntax for each command, square brackets indicate optional arguments.

Note that MS-DOS is not case-sensitive; that means MS-DOS treats upper and lower case characters as equivalent.

Getting help

You can display help about any command by typing:

command /? 

CD

Changes the current directory.

Syntax

CD [path]directory

Example

To change your current directory to C:\LOTUS type:

CD C:\LOTUS 

COPY

Copies one or more files between two directories.

Syntax

COPY [drive:][path]file [drive:][path]file

Example

To copy a file named BUDGET.WK1 from the LOTUS directory on your C: drive to the D: drive type:

COPY C:\LOTUS\BUDGET.WK1 D:\BUDGET.WK1 

DEL

Deletes specified files.

Syntax

DEL [drive:][path]file

Example

To delete the file named \WP\REPORT.OLD on the D: drive type:

DEL D:\WP\REPORT.OLD 

DELTREE

Deletes a directory and its subdirectories.

Syntax

DELTREE [drive:][path]directory

DIR

Lists the files in a directory.

Syntax

DIR [drive:][path][/W]

The /W (wide) option displays the files in columns.

Example

To list the files on your D: drive in the WP subdirectory in wide format type:

DIR D:\WP /W 

DOS2UNIX

Converts an MS–DOS text file to UNIX format.

Syntax

DOS2UNIX dosfile unixfile

Example

To convert README.TXT to HELP.C type:

DOS2UNIX README.TXT HELP.C 

For more information refer to the SoftWindows 95 for UNIX Administrator's Guide.

FORMAT

Formats a disk.

Syntax

FORMAT [drive:] [/option]

The options are shown in the following table:

Table 4-2. Disk Format Options

To format

Give this command

5.25-inch low density

FORMAT A: /F:360

3.5-inch low density

FORMAT A: /F:720

3.5-inch high density

FORMAT A: /F:1.44

Note that you should format only low-density disks in the 720 Kbyte format and only high-density disks in the 1.4 Mbyte format.

A drive set up as a SoftWindows FSA drive cannot be formatted.

Example

To format a high-density disk in drive B: type:

FORMAT B: /F:1.44 

KEYB

Selects a foreign keyboard character set.

Syntax

KEYB [xx,,[[drive:][path][file]]]

where xx is a two-letter keyboard code and file is the name of the keyboard definition file; refer to Setting up keyboards in the SoftWindows 95 for UNIX Administrator's Guide.

Example

To use a French keyboard with the standard definition file type:

KEYB FR 

MKDIR (MD)

Makes a subdirectory.

Syntax

MKDIR [drive:][path]directory

Example

To make a directory named PCAPPS on your D: drive, type:

MKDIR D:\PCAPPS 

RMDIR (RD)

Removes an empty directory.

Syntax

RMDIR [drive:][path]directory

Example

To remove the empty subdirectory named TEMP from your D: drive type:

RMDIR D:\TEMP 

TYPE

Displays the contents of a text file on the screen.

Syntax

TYPE [drive:][path]file

Example

To display the contents of the file TEXT.OUT from the WP subdirectory on your D: drive type:

TYPE D:\WP\TEXT.OUT 

UNIX2DOS

Converts a UNIX format text file to MS–DOS format.

Syntax

UNIX2DOS unixfile dosfile

Example

To convert UNIX.C to DOS.TXT type:

UNIX2DOS UNIX.C DOS.TXT 

For more information refer to the SoftWindows 95 for UNIX Administrator's Guide.

XCOPY

Copies files and directories, including their subdirectories.

Syntax

XCOPY [drive:][path]file [drive:][path] /S

where the /s switch ensures that all the subdirectories are also copied.

Example

To copy all the files and directories from your C: drive to your D: drive type:

XCOPY C:\*.* D:\ /S 

Copying and pasting between MS-DOS and UNIX

When SoftWindows is displaying the MS-DOS window, text can be copied from and pasted into the SoftWindows window using the following procedures.

To paste text into the SoftWindows MS-DOS window

  1. Select the text you want to copy by holding down the Select mouse button (left, by default) and dragging the pointer over the text in the UNIX window.

  2. Lift your finger off the mouse button.

  3. Move the mouse pointer into the SoftWindows MS-DOS window and position the cursor where you want to paste the text.

  4. Click the middle mouse button.

To copy text from the SoftWindows MS-DOS window

  1. Select the text you want to copy, by holding down the left mouse button and dragging the pointer over the text in the SoftWindows MS-DOS window.

  2. Lift your finger off the mouse button.

  3. Move the mouse pointer into the UNIX window and position the cursor where you want to paste the text.

  4. Click the middle mouse button.

    The text will be typed into the UNIX window at the current cursor position.


Note: This may vary depending on the platform you are using. If you encounter problems when pasting refer to your system documentation for details of how to paste text.


Printing from MS-DOS applications

Most MS-DOS applications give best results when set up for a dot-matrix printer such as the widely-used LQ-2500.

To print from MS-DOS to a non-PostScript printer

  1. Choose Printer Ports… from the COM/LPT Ports cascade menu on the Options menu.

    The Printer Ports dialog box appears.

  2. Choose Pipe from the LPT1: popup menu. Check that this is set to the default setting, which sends output to the local print spooler, lp.

  3. Set Enable Windows PostScript Flushing to flush output to the pipe; refer to “Flushing with pipes.”

  4. Choose the appropriate command to print from your MS-DOS application.

To print to a serial printer with default settings

You can print from an LPT port to a serial printer with the following fixed communications settings:

9600 baud, no parity, 8 data bits, 1 stop bit, XON/XOFF handshaking

  1. Connect the printer to the serial port.

  2. Choose Printer Ports… from the COM/LPT Ports cascade menu on the Options menu.

    The Printer Ports dialog box appears.

  3. Choose Device from the LPT1: popup menu. By default this sends output to one of the serial ports. You may need to change this depending on which port you are using.

To print to a serial printer with selectable settings

If you need to use different communications settings, set a COM port to Printer and use the MODE command to set the communications parameters. For example:

MODE COM1:9600,N,8,1 

sets 9600 baud, no parity, 8 data bits, and 1 stop bit, the default setting. XON/XOFF handshaking is supported.

If your application can only print to an LPT port, use the MODE command to direct LPT output to the COM port, for example:

MODE LPT1:=COM1: 

Include the MODE commands in your AUTOEXEC.BAT file if you want to use these settings every time you run SoftWindows.

Installing MS-DOS applications

To install an MS-DOS application you should follow the installation instructions in the manual supplied with the application.

MS-DOS software is typically supplied on one or more floppy disks, and to install the program you copy the files from these disks to your PC hard disk.

To simplify the installation process most PC programs provide a batch file which automatically copies the files for you. The batch file is typically called SETUP.BAT or INSTALL.BAT, and you run it by typing SETUP or INSTALL at the MS-DOS prompt.

To install from 3.5-inch disks

The simplest way of installing PC software, if you have a floppy disk drive available, is to install directly from 3.5-inch installation disks.

A typical sequence will be as follows:

  1. Set up the workstation's floppy disk drive as drive A: or B:; refer to “Setting up floppy disk drives” in the SoftWindows 95 for UNIX Administrator's Guide.

    A: or B: appears in the SoftWindows status bar, indicating that the drive is available to SoftWindows, and you can now access the disk from SoftWindows.

  2. Follow the instructions supplied with the software. For example, you may be instructed to type:

    A:\SETUP 
    

If at any stage in the installation you need to change disks, refer to “To eject a floppy disk.”

To install from 5.25-inch disks

If the software is supplied on 5.25-inch disks, in some cases you can use a PC to copy the software onto 3.5-inch MS–DOS format disks, and then install from these.

Installing from a VFSA drive

Instead of installing directly from 3.5-inch disks, you can copy the software from a PC to a directory on your workstation via a network or serial connection. Attach the directory to SoftWindows as a VFSA drive so that you can access the files in it from SoftWindows, as described in Setting up VFSA drives in the SoftWindows for UNIX Administrator's Guide. Then install from the files in this directory.

Note that some installer programs assume that you are installing from floppy disk. They may not work correctly if you copy all the files to a hard disk first, and then try installing from the hard disk.

Where to install

The installation program will typically give you the option of where to install the files it is copying from the installation disks.

You have the following options:

Table 4-3. Installing Files

Install here

To do this

Drive C: or D: SoftWindows hard disk file.

If you are sure that the files you are installing will fit on your SoftWindows hard disk file, and you do not need to access the files using other UNIX programs.

Drive D: to Z: SoftWindows VFSA drive; refer to Using PC files stored in UNIX.

If you want to install into the UNIX file system rather than your SoftWindows hard disk file so that you can share data with other UNIX applications or other SoftWindows users.

Note that some PC application installer programs will only install onto a hard disk. Also, some installers will assume that drives E: to Z: are a PC network, and install additional networking software if you specify these drives.

Disk space requirements

Before installing onto the hard disk, check the disk space requirements specified in the PC application's manual, and verify the available hard disk space. For example, if you are installing to drive C: type:

CHKDSK 

at the C:\> prompt in SoftWindows.

Note that 1048576 bytes = 1 Mbyte.

If you do not have enough space on your hard disk to install the application, refer to the SoftWindows 95 for UNIX Administrator's Guide for details on how to enlarge or create hard disk drives.