Share via


TYPE Command

Displays the contents of a file.

TYPE FileName1   [AUTO]   [WRAP]
   [TO PRINTER [PROMPT] | TO FILE FileName2]   [NUMBER]

Parameters

  • FileName1
    Specifies the name of the file to display. The name must include a file extension.

  • AUTO
    Turns automatic indentation on. When you also include WRAP, TYPE automatically indents wrapped text in each paragraph by the same amount it indents the first line of the paragraph. For example:

    • Wrapped lines are aligned with the tab when a paragraph begins with a tab.
    • Wrapped lines are aligned with the tab when a paragraph begins with a number (or other text) followed by a tab and text.
    • Wrapped lines are indented by the same amount as the first line when the first line of a paragraph is indented with spaces.
  • WRAP
    Enables word wrap so that a word that is too long to fit at the end of a line is automatically moved to the next line.

  • TO PRINTER [PROMPT]
    Directs output to the printer.

    You can include the optional PROMPT clause to display a print dialog before printing starts. Place the PROMPT keyword immediately after TO PRINTER.

  • TO FILE FileName2
    Directs output to the file specified with FileName2.

  • NUMBER
    Places line numbers at the beginning of each line in the output.

Remarks

TYPE displays the contents of files. This display can be directed to the main Visual FoxPro window, the active user-defined window, a printer, or another file.

When SET HEADINGS is ON, Visual FoxPro inserts a form feed, the path and name of the file, and the date at the beginning of output produced with TYPE. If SET HEADINGS is OFF, this information isn't included.

In FoxPro for MS-DOS, if a printer driver setup is loaded and you direct output from TYPE to a file or a printer, TYPE displays the file contents using the settings from the printer driver setup.

See Also

SET HEADINGS | WordWrap | PROMPT( ) | Type Property