我正在尝试使用antiword将多个.doc文件转换为.docx格式。如何编写如下命令:
for file in os.listdir(directory):
subprocess.run("antiword file > file+'.docx'")
它显示了这个错误:
[Errno 2] No such file or directory: "antiword file > file+'.docx'": "antiword file > file+'.docx'"
除了antiword之外,没有其他方法可以正确读取对我有效的.doc文件
Tags:
子进程不运行bash。因此,运行bash并传递带有记住正确引用的参数的参数
相关问题 更多 >
编程相关推荐