comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Create unique temporary file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Create unique temporary file [message #40677] Tue, 24 August 2004 21:45 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
I need some robust way to create a temporary file. The filepath
function will get you part of the way toward this goal since it can
prepend your system's temporary directory to the file name. But you
still have to come up with a good filename.

filename = FilePath('myfile.txt', /TMP)

The above command will do the job if you only have one copy of the
program running. If there are two or more copies of the program
running, or even a single program running in multiple threads, there's a
possibility of collision when two processes or two threads attempt to
use the same temporary filename at the same time.

What I'd like is some way to generate a completely unique filename
except for the extension to reduce the probability of a collision. Any
bright ideas?

-Mike
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Create unique temporary file
Next Topic: save an IDLanROI to file? (newbie question)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 11:23:35 PDT 2025

Total time taken to generate the page: 0.80166 seconds