Temporary files are often needed during application processing, and in a multi-request environment (like ColdFusion) care must be taken to ensure that these file names are unique. As such, the CFML GetTempFile() function should be used. It takes the name of a directory (which should usually be whatever is returned by the GetTempDirectory() function) and a prefix, and creates (and returns the name of) a valid temporary file. (Applies to: ColdFusion All)

Leave a Reply