# Solved: Does anyone know how to convert unicode files to ANSI?



## Asenine (Apr 19, 2007)

I am looking for a way to convert about 100 unicode text files from unicode to ANSI. I realise that notepad can do this by selecting Save As > ANSI, but as you can probably imagine that is a major headache when there are 100 to process.

I have been googling for a good hour now, but have been unable to locate any programs which will enable me to batch convert these en masse. Anyone got any ideas?

Thanks.


----------



## TheOutcaste (Aug 8, 2007)

http://www.gbordier.com/gbtools/stringconverter.htm

Then a batch like this should do the trick:

```
Setlocal
Set _source=C:\Textfiles
Set _dest=C:\UnicodeFiles
For /F "Tokens=*" %%I In ('dir /b /a-d "%_source%\*.txt"') Do stringconverter "%_source%\%%~nxI" "%_dest%\%%~nxI" /ANSI
```
Set your source and destination folders as needed. I haven't tested this program, just found it via Google, so best to test with a copy of your originals first.

Edit: The stringconverter.exe file needs to be in the same folder as the batch file, or in a folder that is on your path statement. Or you can add another variable to specify the path
HTH

Jerry


----------



## Squashman (Apr 4, 2003)

_Posted via Mobile Device_
I just saw a batch file command yesterday that could do this. I am sure Outcastes solutions will work for sure.


----------



## Squashman (Apr 4, 2003)

Found it.
http://www.robvanderwoude.com/type.php#Unicode


----------



## Asenine (Apr 19, 2007)

Thanks guys, Outcaste's one worked.


----------



## Squashman (Apr 4, 2003)

I found another piece of software to do it.
I use a program called V-The File Viewer. It has an option to change text files for Unicode to Ascii or Vice Versa. You can just select all the files, right click, select filename on the context menu, then select codepage.


----------

