【骚操作】命令行文本格式转换

前言

在命令行转换文件格式

基本命令

  • 可相互转换的文件格式

txthtmlrtfrtfddocdocxwordmlodtwebarchive

<type>:转换后的文件格式
<file>:需要格式转换的文件目录及文件名

1
textutil -convert <type> <file>

批量转换

<type_before>:转换前的文件格式
<type_after>:转换后的文件格式

1
textutil -convert <type_after> *.<type_before>

完成

参考文献

少数派——王禹效
博客园——淅沥枫