Today-I-Learned-Blog

TextUtil: Convert Text Files From One Type to Another

Intro

TextUtil quickly converts almost any text format to another format. This is a command line tool to use in terminal and appeared in OS X 10.4.

Why this is Important

Step-By-Step

Examples

//Convert RTF to TXT:
 textutil -convert txt /path/to/DOCX/files/*.rtf
 
//or navigate inside the directory and type: 
  textutil -convert txt *.rtf

//Convert DOCX to TXT:
textutil -convert txt /path/to/DOCX/files/*.docx

//Convert TXT to DOCX
- Navigate inside the directory and type:
textutil -convert docx *.txt

//Convert DOCX to RTF :
textutil -convert rtf /path/to/docx/files/*.docx

//Convert TXT to HTML
 textutil -convert html *.txt 

TL;DR