# Purge temp files automatically?

**URL:** <https://www.ruby-forum.com/t/purge-temp-files-automatically/113783>\
**Category:** Rails\
**Created:** [September 4, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/purge-temp-files-automatically/113783 "2007-09-04T22:41:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [September 4, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/purge-temp-files-automatically/113783/1 "2007-09-04T22:41:47Z")

</div>

Im doing some photo manipulation with mini-magick.

Sometimes, in one action, it will work on 15+ photos and create like 40+  
temp files. It seems that the temp files will get deleted while the  
action is happening.

This causes about 1 out of 10 photos to trigger an error since the temp  
file containing the photo information gets deleted before it finishes  
working with it.

Has anyone seen this happen before?

Aryk
