[TxMt] Re: How can I save 100+ files with a different encoding format?
Christian Rosentreter
karibu at gmx.net
Sun Jan 10 09:36:57 UTC 2016
Hello there,
> On 10 Jan 2016, at 9:46 AM, J Galt <jgaltusa at gmail.com> wrote:
>
> I have a 100+ files that were saved with "ISO-8851-1 Western” encoding. I need to convert and save them to “UTF-8”encoding. I can easily open all of them but when I attempt so perform a “Save as” it only saves the first document. Is there save all of them in a single step?
IMHO, such task is a job for some command line magic. :-)
Something like this could do:
$ find sourcedir -type f -execdir sh -c 'iconv -f iso-8859-1 -t utf-8 "{}" > /path/to/destdir/"{}"' \;
This command line uses iconv to convert all files from "sourcedir" and put the result of the conversion into "destdir".
regards,
Christian
--
https://www.binaryriot.org/
More information about the textmate
mailing list