Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
- Posts: 5
- Joined: 2018-10-16T03:29:47-07:00
- Authentication code: 1152
I have a simple script to convert all jpegs in a folder into one pdf:
Is it possible to rename the myfile.pdf to the folder name it sits in? So if the jpgs are in a folder called 'myFolder', the pdf will be myFolder.pdf
I have a lot of folders with images and don't want to manually retype the pdf filename.
- Posts: 11446
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
You would need to decide on the rules when in a nested folder, eg /mydir/mydir2/abc.pdf. What do you want the new name to be?
You might do this by setting a shell variable before the magick command, or renaming afterwards.