I am trying to delete a directory and a file using cfdirectory. I have the
following code, and it only works half the time.
<cfset SetDirectory = "D:\inetpub\wwwroot\test">
<cfset DeleteFile = SetDirectory & "\index.cfm">
<cffile action="delete" file="#DeleteFile#">
<cfdirectory action="delete" directory="#SetDirectory#">
When it gives me an error, it says that the directory is not empty. After I
get this error and look in the directory, the file is deleted. How can I
prevent this from happning, so it deletes them both every time.
Thanks for any help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists