This is a point of confusion for many grasshoppers and one that I tried to clarify in my seminal epistle on this subject. Nevertheless, I get enough questions about what to do with the ground wire that some further clarification is in order.
I recently moved. My Kenmore dryer has a 3 prong plug, my new house a 4 prong receptable. I replaced the old cord with a new 4 wire cord, But didn't connect the green ground wire. The dryer came with a green wire attached to the frame. Do I remove or leave it? and connect the green from the 4-wire cord there? Do I attach both green wires to the frame? This dryer did not have the metal strap as shown in your diagrams.
A dryer's internal ground can be done using a bare metal strap at the terminal block or by using a green wire that's screwed to the dryer's cabinet-- it makes no difference which is used because they each serve the same purpose.
In the old three-wire dryer cord configuration, the neutral and ground were tied together (Figure 1).
At this point, Samurai's 6th Law of Appliance Repair illumines us, "Neutral is not ground; ground is not neutral," and we understand the problem with the old three-wire dryer cord configuration is that it violated Samurai's 6th Law.
The whole point of the new four-wire dryer cord is to separate the ground from the neutral and thus comply with Samurai's 6th Law of Appliance Repair. This is illustrated in Figure 2 on a dryer equipped with a grounding strap.
So, in light of this inspiring and illuminating tome, can you answer your own question about what to do with the green wires from the dryer and the cord? That's right: they both get attached to the dryer cabinet. Go get yourself a cardboard cookie.