I am happy now that my PC is working again. It seemed to have broken down shutting itself off after 15min to half an hour.
As it is quite old I thought at first it must be a hardware fault or a heating problem.
Before abandoning it altogether I tried to load an older system configuration using the windows accessories tool. That allowed me to clean up the system. I found I had over 500,000 temporary files on my hard drive. Once the system had been cleaned up my PC started behaving again.
So despite the fact that I search for temporary files to delete them on a regular basis they must have accumulated over time first slowing my PC down and next shutting it off completely. So in future I shall use the windows accessories tools on a more regular basis.