我正在尝试删除并重新创建测试文件,但出现以下错误。谁能告诉我为什么会这样?
错误:
ColdFusion could not delete the file e:\sample\test2.html for an unknown reason.
代码:
<cfif FileExists("e:\sample\test2.html")>
<cffile action="delete"file="e:\sample\test2.html"><br>
<p>deleted the file </p>
<cfelse>
<p>Sorry, can't delete the file - it doesn't exist.</p>
</cfif>
<cfset createObject("java", "java.lang.Thread").sleep(JavaCast("int", 90000))>
<cfsavecontent variable="HTML">
<cfinclude template="noticeEmail.cfm">
</cfsavecontent>
<cffile action="WRITE" attributes = "normal" nameconflict="Overwrite"
file="e:\sample\test2.html" output="#HTML#">