pasc
1
So...
I have a text file that contains this (hex.txt):
#8C7CA6
#6C70A5
#75777C
#959A90
#7A7C6C
#867DAB
#80867E
#8A87BD
#6B71C6
#8F8A79
#9A9DCE
#7E87D0
#69709E
#82968C
#7C8F81
#A3917B
#8CAB8C
#728170
#95A19C
#8FA5A3
#A6CAB3
My code looks like this:
for %%x in (*png) do convert -monitor %%x -transparent "%VALUE%" %%x
the %VALUE% is what should be changed by the line of the text file.
It should repeat like this
Any help is appreciated.
Try this if you have awk
$ awk '{print "for %%x in (*png) do convert -monitor %%x -transparent \""$1"\" %%x"}' inputfile
RudiC
3
Did you consider using the FOR /F
option (needs Command Extensions enabled) to read the file line by line?
pasc
4
Like this ?:
for /F %%c in (hex.txt) do (
for %%x in (*png) do convert -monitor %%x -transparent "%%c" %%x
)
RudiC
5
Looks acceptable, but I don't have a system to test at hand (lucky me!) What be your result?
pasc
6
ok... so I guess.
This has got nothing to do with the looping, and more with the code itself...
Well..
At least that is cleared up. Thanks.