Skip to content

Instantly share code, notes, and snippets.

@jobou363
Created February 7, 2019 05:36
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 jobou363/7582ca85caccb69218516d4e467a7419 to your computer and use it in GitHub Desktop.
Save jobou363/7582ca85caccb69218516d4e467a7419 to your computer and use it in GitHub Desktop.
List files encoding
# encrypt files to utf-8 no bom
[string[]]$Excludes = @('**\\Debug\\**', '**\\bin\\**', '**\\obj\\**', '*TemporaryGeneratedFile*.cs', '*.Designer.cs')
$files = Get-ChildItem -Include *.aspx, *.asmx, *.cs -Exclude $Excludes -Recurse -Path . | select FullName, @{n='Encoding';e={Get-FileEncoding $_.FullName}}
$files.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment