I have a folder containing sub-folders with jpg images.

I want to print all the images (at one go) such that following information is addtionally printed as header / footer on the image file :

1) name of the folder in which the file is located (this shud get printed as footer)
(just the name of folder and nopt the complete path)

2) file name gets printed as footer.

I should able to print the above with either option or both op[tions.

Apprecite your response, thanks in advance