Dear all,
I am about to convert a number of files which are all in C:\temp\bildbearbeitung
“test1”, “test2” …..
C:
cd \temp\bildbearbeitung
C:\Programme\ImageMagick-7.0.6-Q16\magick mogrify -path C:\temp\bildgroesse -resize 16% -compress LZW *.tif
I resize, compress and save them in another directory C:\temp\bildgroesse. It works well thanks to fmw42 and snibgo.
Now I want to change the name of the output file from “test1” to “test 1_org”, “test2” to “test2_org” and so on.
I tried in vain
C:
cd \temp\bildbearbeitung
C:\Programme\ImageMagick-7.0.6-Q16\magick mogrify -path C:\temp\bildgroesse -resize 16% -compress LZW -set filename:f %t_org %[filename:f].tif *.tif
I got the message: mogrify: unable to open image '%[filename:f].tif': No such file or directory @ error/blob.c/OpenBlob/3109.
Is it correct that mogify can not set filenames?
So I tried the convert command
cd \temp\bildbearbeitung
C:\Programme\ImageMagick-7.0.6-Q16\magick mogrify -path C:\temp\bildgroesse -resize 16% -compress LZW *.tif
cd \temp\bildgroesse
C:\Programme\ImageMagick-7.0.6-Q16\magick convert *.tif -compress LZW -set filename:f %t_org %[filename:f].tif
it works but only for the first file and blows it up (from 0.8 MB to 8 MB). By the way there is the same result for "filename:t %t_org %[filename:t]" and "filename:f %f_org %[filename:f]",
Am I right that mogrify can not use “set file name”? Why is the command line with the “convert -set filename” only working for the first file?
How to delete the old files “test1”, “test2” ….?
Thanks for your help
Uli
mogrify and convert
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: mogrify and convert
Mogrify cannot change filenames.
"convert" works differently to "mogify".
This command would read all your *.tif files, and write them into a single output tif file.
"convert" works differently to "mogify".
Code: Select all
C:\Programme\ImageMagick-7.0.6-Q16\magick convert *.tif -compress LZW -set filename:f %t_org %[filename:f].tif
snibgo's IM pages: im.snibgo.com
Re: mogrify and convert
Thank you,
now I know why the one file is so big.
But what I should write instead and how to delete the files with the old name?
Thanks
Uli
now I know why the one file is so big.
But what I should write instead and how to delete the files with the old name?
Thanks
Uli
Re: mogrify and convert
Dear All,
at the end I managed to solve the problem.
Thanks
Uli
at the end I managed to solve the problem.
Thanks
Uli
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: mogrify and convert
Could you tell us what the problem was and how you solved it? That could help others later on.