Question

I'm trying to do the following:

$OOOPYTHON DocumentConverter.py .odt .pdf

for all of the ODT files i have in a particular document and looking for the right syntax to convert all odts to pdfs.

Thanks! Jake

Was it helpful?

Solution

for file in *.odt; do
    $OOOPYTHON DocumentConverter.py "$file" "${file%.odt}.pdf"
done

OTHER TIPS

You can use find, ex :

find /path/to/files/ -name '*.odt' -exec python /path/to/DocumentConverter.py '{}' '{}.pdf' \;
for file in `ls *.odt`
do
   DocumentConverter.py $file ${file%.odt}.pdf
done

or whatever the actual command syntax is

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top