Can someone give me a Powershell script that will change the format of all files in a folder from Unicode to ANSI? Here is an example folder structure:
c:\DBObjects +StoredProcs - sp1.sql - sp2.sql - sp3.sql +Views - v1.sql - v2.sql .Functions - fn1.sql - fn2.sql
I tried the following script for a single file and it worked. However, it will create another file:
Get-Content sp1.sql -encoding Unicode | Set-Content sp1_Ansi.sql -encoding ASCII
Thanks!
source share