This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
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.
type [<drive>:][<path>]<filename>| Parameter | Description |
|---|---|
[<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. |
To display the contents of a file namedholiday.mar, type:
type holiday.marTo display the contents of a lengthy file namedholiday.mar one screen at a time, type:
type holiday.mar | moreWas this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?