Created
July 1, 2014 00:41
-
-
Save pcgeek86/d7c501fad6bd0f7333ae to your computer and use it in GitHub Desktop.
PowerShell: Quickly review a list of files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Trevor Sullivan | |
# E-mail: [email protected] | |
# 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