Chapter 7. Using MS–DOS

This chapter describes the operating system that PCs use, called MS–DOS, and explains how to take advantage of the most useful features of the MS–DOS editor to help you run PC applications under Unix.

About MS–DOS

SoftWindows includes MS–DOS version 6.22. As with earlier versions of MS–DOS, this lets you give commands by typing instructions at the MS–DOS prompt.

MS–DOS editor

MS–DOS 6.22 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.

MS-DOS reference books

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.

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 as shown below.

Figure 7-1. The MS-DOS Editor Window


To use the mouse

  • Choose Attach Mouse from the Actions menu.

For more information refer to Chapter 4, “Using the mouse in MS-DOS”.

To edit the file

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

  • Type to insert text at the cursor.

To cut, copy, and paste text

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

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

To delete text

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

  • Press the Delete key or type over the text you highlighted for deletion.

To exit from the MS-DOS editor

  • Choose Exit from the editor's File menu.

You can do this from the keyboard by typing the Alt and F keys at the same time, then type X.

You will be prompted to save the file before exiting if you have made any changes to it, as shown in the Figure below.

  • Click Yes, or press Return, to save the changes and exit from the MS-DOS editor.

    Figure 7-2. Exiting 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 for Unix Administrator's Guide.

FORMAT

Formats a disk.

Syntax

FORMAT [drive:] [/option]

The options are shown in the following table:

Table 7-1. 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

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.

HELP

Gives help about using an MS–DOS command.

Syntax

HELP [command]

where command is the long or short form of the command.

Example

To get help about the FORMAT command, type:

HELP FORMAT 

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 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 

PRINT

Prints a text file to the printer.

Syntax

PRINT [drive:][path]file

Example

To print the file named TEXT.OUT from the WP subdirectory on your D: drive type:

PRINT D:\WP\TEXT.OUT 

Note that after typing in a PRINT command you may see the message:

Enter the name of the list device [prn:]

Respond by pressing Enter.

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 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 

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.

  1. Make sure your floppy drive is set to the A: or B: drives. To do this:

    • Open the SoftWindows menu item Actions, and choose Activate.

    • A red checkmark should appear next to the A: or B: drive. This indicates that the drive is active.

    • If neither the A: drive nor the B: drive is active, see "Setting up floppy disk drives" in the SoftWindows for Unix Administrator's Guide.

  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 Chapter 4, “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 fsoftware from a network server

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. To do this:

  1. Make a directory on your workstation to copy the application installer files into (these installation files are usually called SETUP.BAT or INSTALL.BAT).

  2. To make this directory available to SoftWindows, you must specify the directory as an FSA drive. To do this, see "Setting up FSA drives" in the SoftWindows for Unix Administrator's Guide.

  3. Now you can install the files from your newly set-up directory.


Note: 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 7-2. Installing Files

Install here

To do this

Drive C: or D:

SoftWindows hard disk file.

If you are sure that the SoftWindows 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 E: to Z: SoftWindows FSA drive

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



Note: Some PC application installer programs will only install onto a hard disk file (drives C: or D:).. 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: 1048576 bytes = 1 Mbyte.

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