I am attempting to convert PDF files in 2,432 subdirectories (one PDF file per folder) to HTML files.
For example, I have tried a few variations of
find . -type d | while read d; for file in *.pdf; do pdftohtml -c -i -s "$file"; done
and
for f in ./*/*.pdf; do pdftohtml -c -i -s "$file"; done
without any success. I have also tried some others, however, I just can't get anything to work this time.
I know that part of the code works because I can put multiple PDF files in one folder and use
for file in *.pdf; do pdftohtml -c -i -s "$file"; done
to recursively convert all of the files in that folder to HTML.
Is there a way that I can search through each folder and convert each file with a bash script? Or is this something I will have to do one folder at a time?