at999
asked on
coldfusion website - manage temporary files
My coldfusion website generates temporary files(files with exension .tmp) for some images
What is the ideal way to clean these files, how should be the temporary files managed in such websites? thanks....
What is the ideal way to clean these files, how should be the temporary files managed in such websites? thanks....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(no points please)
Some processes in CF may create temporary files. For example file uploading, charting, etc... But CF typically those files itself, automatically So as mentioned, please clarify whether you are talking about those types of files ... or some other temporary files _you_ create explicitly within your application code.
Some processes in CF may create temporary files. For example file uploading, charting, etc... But CF typically those files itself, automatically So as mentioned, please clarify whether you are talking about those types of files ... or some other temporary files _you_ create explicitly within your application code.
>> But CF typically those files itself, automatically
Correction: ... typically REMOVES those files ... automatically
Correction: ... typically REMOVES those files ... automatically
ASKER
thanks ......... actually the files gets generated by a coldfusion code - i call coldfusion function GetTempFile()
something like this
<cfset mytempFile = GetTempFile(Application.Te mpDir,"A1" )>
what is the ideal way to clean such files... thanks
something like this
<cfset mytempFile = GetTempFile(Application.Te
what is the ideal way to clean such files... thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry dgrafx, i forgot to mention that these tmp files are created to create image files from oracle blob tables
yeah - ok
just use the code i posted
it will work
good luck
just use the code i posted
it will work
good luck
ASKER
thanks a lot to all for your help... i will create a coldfusion schedule task to delete the temporary files - ussign cf command - fileDelete(Application.tem pDir & files.name)
ASKER
thanks to all of you for the help
>> i forgot to mention that these tmp files are created to create image files from oracle blob tables
Just wondering ... but is there a reason you need to do this? In many cases it's not necessary to have physical files since a lot of cf tags work with blobs as well.
Just wondering ... but is there a reason you need to do this? In many cases it's not necessary to have physical files since a lot of cf tags work with blobs as well.
During file upload?
Could you explain a bit more - for ex. was the creation of these tmp files written on purpose by someone?
Are they under the website directory or are they in the windows ColdFusion temp directory?