Hi, I just posted this post on batch processing: viewtopic.php?f=1&t=26321, and the advise was sound.
Now, before I put the images in their respective folders, I would like to operate on the whole folder, but only on all the images with a selected prefix.
Some of the files would be 18_14+4 and then _{num}.gif I would like to operate on all the images that have the first 7 characters in common, irrespective of the next three numbers.
So if I went: convert *.gif -resize 4500x516 *.gif, this would only be applicable for some of the images, but I don't want to separate them into folders yet to save time by operating on the larger folder first, first all the images, then various catagories, then separate into folders...
Thankyou for your help
Batch image editin: operating on files with prefix of...
-
- Posts: 4
- Joined: 2014-09-28T06:20:26-07:00
- Authentication code: 6789
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch image editin: operating on files with prefix of...
This is not proper syntax for convert. I do not think you can have wild cards for both input and output in IM. If you are trying to get one output for each input image. then use mogrify. That is what it is meant to do.convert *.gif -resize 4500x516 *.gif
Your question about filtering names is not an IM topic. I do not think IM can do that kind of thing. It is something you can do in your OS directly or by shell or bat scripting.
-
- Posts: 4
- Joined: 2014-09-28T06:20:26-07:00
- Authentication code: 6789
Re: Batch image editin: operating on files with prefix of...
Thankyou for your reply.
As I understand it, convert can work on multiple files, that command just worked, resized all the images in the folder to what I wanted. What is the issue is that mogrify has less commands than it works with, and convert will do multiples with some commands, just not all.
So this way or that way, I welcome further replies on this topic.
As I understand it, convert can work on multiple files, that command just worked, resized all the images in the folder to what I wanted. What is the issue is that mogrify has less commands than it works with, and convert will do multiples with some commands, just not all.
So this way or that way, I welcome further replies on this topic.

- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch image editin: operating on files with prefix of...
Look carefully at your files and the names.
When I create a folder, called test on my desktop (Mac OSX)
and put 3 files there (copies if logo:).
cd desktop/test
ls
logo1.png
logo2.png
logo3.png
Now do
convert *.png -resize 50% *.png
ls
logo1.png
logo2.png logo3-1.png
logo3.png
logo3-0.png
logo3-2.png
logo3-3.png
logo3-4.png
So I start with 3 images and end with 4 new images that are all from logo3.png
If you are on Window, perhaps your OS works different from unix.
When I create a folder, called test on my desktop (Mac OSX)
and put 3 files there (copies if logo:).
cd desktop/test
ls
logo1.png
logo2.png
logo3.png
Now do
convert *.png -resize 50% *.png
ls
logo1.png
logo2.png logo3-1.png
logo3.png
logo3-0.png
logo3-2.png
logo3-3.png
logo3-4.png
So I start with 3 images and end with 4 new images that are all from logo3.png
If you are on Window, perhaps your OS works different from unix.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch image editin: operating on files with prefix of...
Some shells will expand wildcards, so might expand "*.gif" into a list of all filenames that match.
Windoze does this, as I discovered by accident. My own programs can take the argument "/?" for help. This worked fine until I had a file named "x" in my root directory. So Windows translated "/?" into "/x" before passing it to my program, which then did the correct action for the argument "/x", even though I had merely asked for help. It took me two weeks to figure out that this wasn't a bug in my software. Grrr.
I hate this "feature".
Windoze does this, as I discovered by accident. My own programs can take the argument "/?" for help. This worked fine until I had a file named "x" in my root directory. So Windows translated "/?" into "/x" before passing it to my program, which then did the correct action for the argument "/x", even though I had merely asked for help. It took me two weeks to figure out that this wasn't a bug in my software. Grrr.
I hate this "feature".
snibgo's IM pages: im.snibgo.com