Page 1 of 1

filename as folder name

Posted: 2017-07-03T23:41:18-07:00
by architektura
Hi I convert images into one big image where every small images have name as his names but I want to change a name of big image as folder name is possible ? I read http://www.imagemagick.org/script/escape.php and I see something like that:

convert *.jpg -resize 80% -set filename:f '%t' ../'%[filename:f].jpg'

but I cant use %d directory component of path - any help :)

Re: filename as folder name

Posted: 2017-07-04T01:42:41-07:00
by snibgo
What version of IM? What platform?

A directory might be something like /users/Alan/mydir\ or c:\users\Alan\mydir\. If you want the output to be named mydir.jpg, you need to do that in a script.

Re: filename as folder name

Posted: 2017-07-04T03:38:53-07:00
by architektura
maybe You need some pdf from jpg

for /f "tokens=*" %G in ('dir /b /s /a:d "C:\top_path\"') do "C:\im\magick.exe" montage -tile 5x5 %G\*.jpg %G.pdf

this give nice multi pdf

:)

logical tile will be nice feature
I need count of images in current folder -
if count =<5 tile = 5x1
if count=<10 tile = 5x2
ect ...(modulo)