Skip to content

Latest commit

 

History

History
7 lines (6 loc) · 504 Bytes

README.md

File metadata and controls

7 lines (6 loc) · 504 Bytes

ChangeEncodingPowerShellCommand

This is a power shell command recursive to change encoding at files inside a directory

$PSDefaultParameterValues['Out-File:Encoding'] = 'ascii'; Get-ChildItem . -recurse -force| % { Get-Content $_ | Out-File -FilePath "$($.DirectoryName)\1-$($.name)" -Encoding default } ; Get-ChildItem . -exclude 1-* -recurse -force | foreach ($) {Remove-Item $.fullname -force}; Get-ChildItem . -recurse -force | Rename-Item -NewName{$_.name -replace "1-",""} -force