前言
MacOS上通过textutil命令实现文件格式转换
单个文件格式转换
txt、html、rtf、rtfd、doc、docx、wordml、odt、webarchive
<type>:转换后的文件格式
<file>:需要格式转换的文件目录及文件名
1
| textutil -convert <type> <file>
|
批量文件格式转换
<type_before>:转换前的文件格式
<type_after>:转换后的文件格式
1
| textutil -convert <type_after> *.<type_before>
|
完成
参考文献
少数派——王禹效
博客园——淅沥枫