Page 1 of 1

Lay one image to another in all subfolders and overwrite

Posted: 2016-03-30T04:00:18-07:00
by DLC
Hi,
I have a huge problem to lay one image to another in all subfolders in main folder and overwrite the pictures. I'm begginer.

I use: Windows 8.1

I wrote something like this:
FOR %G IN ("*.jpg") DO composite netrelo_pl.png -gravity center "%G" "output\%G"

but the problem is that the program composited the pictures only in main catalogue and write it in "output" folder (not overwrite the images), what is obviousl.

How can I composite endless amount of pictures in main folder and subfolders with 1 image and overwrite all images (they have to have the same names)?
I'm a huge newbie. Thank you for help!

Re: Lay one image to another in all subfolders and overwrite

Posted: 2016-03-30T10:29:46-07:00
by snibgo
Your question seems to be about using the shell "for" command. See "help for", and particularly the "/R" option.

This may do what you want:

Code: Select all

FOR /R %G IN ("*.jpg") DO composite netrelo_pl.png -gravity center "%G" "%G
... but do a backup first!