Skip to main content
Inspiring
June 11, 2015
Question

Files not deleted in CF 10 tmp directory

  • June 11, 2015
  • 1 reply
  • 1584 views

There's a directory in the CF 10 Windows installation -- ColdFusion10\cfusion\runtime\work\Catalina\localhost\tmp -- that looks like it is used as a temporary storage for files being uploaded using cffile. Usually the file gets created there and then deleted once the processing is complete. But I have an issue where sometimes the files don't get deleted. This is an issue for me because CF is installed on the C drive which has somewhat limited free space. Does anyone know what causes the files to not get deleted and what can be done about it?

Thanks.

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    June 13, 2015

    During upload, ColdFusion will store files in that directory if it cannot identify, as an absolute path, the value of the 'destination' attribute. I am assuming in what follows that there are still files in the directory ColdFusion10\cfusion\runtime\work\Catalina\localhost\tmp.

    Right-click in a blank area within the directory. Choose to View the contents by Details. Are any of the Date Modified values recent?

    If so, then the corresponding files might not have been uploaded to the directory you expected. Verify that the destination attribute is an absolute path.

    It is usual to use the expandPath function for this purpose. For example, to upload a file to the current directory you would use something like directory="#expandPath('.')#\fileName.ext"

    SteveTXAuthor
    Inspiring
    June 13, 2015

    Thanks for the response. I'm fairly positive we're using an absolute path in our CFFile upload calls. But I'll dig a little deeper and see if there is a bug somewhere that is messing up that path setting.