I am trying to convert multiple .doc files to .docx format using antiword. How to write a command like this:
for file in os.listdir(directory):
subprocess.run("antiword file > file+'.docx'")
it shows this error:
[Errno 2] No such file or directory: "antiword file > file+'.docx'": "antiword file > file+'.docx'"
There is no other way to read .doc file properly that worked for me other than antiword.