running more than one command line commands inside for loop
- by klijo
i have a folder containing images and i want to determine its Compression method used. So i would loop through the folder and do a grep Compression like this
and note i have installed grep for windows
for %f in (*.jpg) do identify -verbose "%f" | grep Compression >> info.txt
However i need to write the file name and compression technique used so i modified the above command
for %f in (*.jpg) do identify -verbose "%f" | grep Compression & echo "%f" & echo: >> info.txt
But the problem is that i get a blank txt file. Could someone pleas help me.