What do you do if you have multiple files in a folder, and you want to convert them all to a different filetype and retain the filenames? Use openBabel, of course!
Here is a very simple one-liner to convert multiple files from one format to another while retaining the original filename.
babel -ig09 *.log -omol -m
In this example, a Gaussian output file is converted into a molfile. For XYZ to pdb the change would be:
babel -ixyz *.xyz -opdb -m