Skip to content

Instantly share code, notes, and snippets.

@pcgeek86
Created July 1, 2014 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcgeek86/d7c501fad6bd0f7333ae to your computer and use it in GitHub Desktop.
Save pcgeek86/d7c501fad6bd0f7333ae to your computer and use it in GitHub Desktop.
PowerShell: Quickly review a list of files
# Author: Trevor Sullivan
# E-mail: pcgeek86@gmail.com
# Website: http://trevorsullivan.net
# Description: This script allows you to quickly review the contents of a list of files
# in the folder specified in the $Path variable, using the "more" function.
$Path = 'C:\Users\ts\Documents\WindowsPowerShell\Modules\DSC\Resources';
$FileList = Get-ChildItem -Path $Path -Recurse | ? { !$_.PSIsContainer; };
$FileList | % {
Clear-Host;
Write-Host -Object $_.FullName -ForegroundColor Red;
Get-Content -Path $_.FullName -Encoding Ascii | more;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment