[TxMt] Re: How can I save 100+ files with a different encoding format?

J Galt jgaltusa at gmail.com
Mon Jan 11 08:51:22 UTC 2016


Do I execute this from the terminal?

I tried to but it returned the following error:
-bash: -type: command not found



> On Jan 10, 2016, at 3:36 AM, Christian Rosentreter <karibu at gmx.net> wrote:
> 
> 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".



More information about the textmate mailing list