Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

type

Feedback

In this article

In the Windows Command shell,type is a built in command which displays the contents of a text file. Use thetype command to view a text file without modifying it.

In PowerShell,type is a built-in alias to theGet-Content cmdlet, which also displays the contents of a file, but using a different syntax.

Syntax

type [<drive>:][<path>]<filename>

Parameters

ParameterDescription
[<drive>:][<path>]<filename>Specifies the location and name of the file or files that you want to view. If your<filename> contains spaces, you must enclose it in quotation marks (for example, "Filename Containing Spaces.txt"). You can also add multiple filenames by adding spaces between them.
/?Displays help at the command prompt.

Remarks

  • If you display a binary file or a file that is created by a program, you may see strange characters on the screen, including formfeed characters and escape-sequence symbols. These characters represent control codes that are used in the binary file. In general, avoid using thetype command to display binary files.

Examples

To display the contents of a file namedholiday.mar, type:

type holiday.mar

To display the contents of a lengthy file namedholiday.mar one screen at a time, type:

type holiday.mar | more

Related links


Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

  • Last updated on

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?