# Tempfile with a certain suffix

**URL:** <https://www.ruby-forum.com/t/tempfile-with-a-certain-suffix/197592>\
**Category:** Ruby\
**Created:** [October 16, 2010, 10:12pm UTC](https://www.ruby-forum.com/t/tempfile-with-a-certain-suffix/197592 "2010-10-16T22:12:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [October 16, 2010, 10:12pm UTC](https://www.ruby-forum.com/t/tempfile-with-a-certain-suffix/197592/1 "2010-10-16T22:12:07Z")

</div>

Hi,

is there a way in ruby to create a tempfile with a certain suffix, say  
“.html”?  
I can of course rename my created tempfile but then I have to take care  
for deleting the file.

Thomas
