Controlling LED and accessing SD using Mega 2560 and Ethernet Shield

And where is the code to access the files on the SD card? You haven't included that part into your sketch.