Read Content

Commands

type filename.txt

Displays file content in Command Prompt.

Get-Content filename.txt

Retrieves file content in PowerShell.

gc C:\path\to\file.txt

Another PowerShell alias for Get-Content.

more filename.txt

Shows file content page by page.

notepad filename.txt

Opens file in Notepad.

gc filename.txt

PS alias for Get-Content.

cat C:\path\to\file.txt

PS alias.

notepad C:\path\to\file.txt

Opens a file in Notepad for reading (and editing).

notepad++ C:\path\to\file.txt

Opens a file in Notepad++

[System.IO.File]::ReadAllText("C:\path\to\file.txt")

Reads content using .NET

Alternate Data Streams

ADS looks like this:

FileName:StreamName:$DATA <-- Normal for files to have $DATA

FileName:StreamName:something <-- Worth investigating

dir /R <file>

Reveal all streams

Get-Item <file> -Stream *

Reveal all streams

more < <file>:<streamname>

Read specified ADS data

Get-Content <file> -Stream <streamname>

Read specified ADS data

Last updated

Was this helpful?