Question
Use Scripting.FileSystemObject instead of CFFILE
Ok. I'm having some issues with CFFILE where it cant delete a
file that was either just read or "touched" and CFFILE throws an
error. It is due to the file being locked. I have almost giving up
trying to use CFFILE and i am resorting to using FSO
Scripting.FileSystemObject instead, which has bailed me out on
issues in the past.
What I am trying to do is basically just delete a file. My code is as such: ( this is just to test )
<CFOBJECT TYPE="COM" CLASS="Scripting.FileSystemObject" NAME="FSO" ACTION="CREATE">
<cfscript>
FSO.DeleteFile("d:\directory\somefile.psp");
</cfscript>
Im getting an exception error when trying to do so:
The cause of this exception was that: AutomationException: 0x800a0046 - .
BTW I got the reference on the DELETEFILE() from ASP based code references.
Has anyone ever done this before? and if so, what Am I doing wrong? any one want to try to come up with a solution? I could use a bit of help on this one 😐
What I am trying to do is basically just delete a file. My code is as such: ( this is just to test )
<CFOBJECT TYPE="COM" CLASS="Scripting.FileSystemObject" NAME="FSO" ACTION="CREATE">
<cfscript>
FSO.DeleteFile("d:\directory\somefile.psp");
</cfscript>
Im getting an exception error when trying to do so:
The cause of this exception was that: AutomationException: 0x800a0046 - .
BTW I got the reference on the DELETEFILE() from ASP based code references.
Has anyone ever done this before? and if so, what Am I doing wrong? any one want to try to come up with a solution? I could use a bit of help on this one 😐
