我正在尝试将.docx
文件夹中的所有文件转换成.txt
文件。
我使用textutil。
textutil -convert txt filepath/*.docx
我尝试了此操作,并收到“参数列表过长”错误。
您可以find -exec
为此:
find filepath \
-maxdepth 1 \
-type f \
-name '*.docx' \
-exec textutil -convert txt {} +
这将查找*.docx
以给定目录结尾的所有文件,并textutil
尽可能少地运行命令,而不会遇到“参数列表过长”错误。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句