Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Need to convert 35,000 .txt files from UNICODE to ANSI/ASCII

$
0
0

We rec'd a batch of unicode files that we need to load into Summation, however, they have to be converted to ANSI/ASCII. I seem to have found a way to do it one file at a time using powershell, when I try and do a batch of them it just takes and combines them into one file instead of overwriting the original. I'm new to PS, as in I just started using it today, I feel like the answer is right in front of my by I don't know how to organize the commands.

If there is a better way to do this, I"m open to suggestions.

Current script I'm using: gc -en utf8 *.txt | Out-File -en ascii 1.txt

Also tried this: Set-Content *.txt -Encoding ASCII -Value (Get-Content *.txt)


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>