A Mansfield Woodhouse man has admitted making and possessing indecent photographs of children.
Town magistrates were told how police traced Steven Marshall (38), of Marples Avenue, after he used a file sharing network for the images.
Robert Carr, prosecuting, said: “He immediately confessed as he had been expecting them to call for some time.
“Mr Marshall told police during interview he had made plans to distance himself from his family and had investigated suicide.”
The charges relate to six offences between December 2010 and February 2011. Marshall will be sentenced at Nottingham Crown Court on 26th February.
A magistrate said: “You will be remanded in custody for your own safety.”