Thanx a lot this just worked fine for me.

Nikon D40, deleted 1 photo. Immediately removed SD card from camera and searched for solution.