Batch convert old Word .docs to .pdf on Mac

I have lots of old MS Word docs from the 1980s and 1990s that I’d like to batch convert to .pdfs one folder at a time. I’ve downloaded LibreOffice to my applications folder and run the following line in Terminal (while in the Applications directory):

libreoffice --headless --convert-to pdf --outdir ~/1987Letters ~/1987Letters/*.doc

The response I keep getting in Terminal is “-bash: libreoffice: command not found”

I know I’m doing something wrong, but I have no idea what. Any advice will be greatly appreciated.

Thanks in advance.

MacOS is stating it does not recognise the command “libreoffice” most likely because the program is not included on the path. Try using /Applications/ in place of “libreoffice”. Similar answer here.