Temporary Files in Windows 8.1

My temporary files are constantly piling up. When I went to bed one night, I had 523 GB free on my main drive. When I got up, I had 259 GB of space. I wrote a script to see what was taking up all that space, and it was temporary files. I wrote a script to delete them, and I have to run it everyday because they pile up so fast. How can I stop them from piling up like that?

i dont want to sound stupid ,but CCleaner