Question
deleting directory
I am trying to delete the records and the directories related
to it but in some cause i am facin a problem.
Here is my Code
<cfif isdefined('form.realdel')>
<cfset session.holdRecord = ListToArray(#Form.thisCampSchool#)>
<cfinvoke
component="EcoLife.admin.CFC.users"
method="thisDelete">
<cfinvokeargument name="willgetDeleted" value="#trim(form.thisCampSchool)#"/>
</cfinvoke>
<cfloop index="x" array="#session.holdRecord#">
<cfoutput>
<cfdirectory action="delete" recurse="yes" directory="#websitename#attachments/schools/#x#">
</cfoutput>
</cfloop>
<cflocation addtoken="no" url="campadd.cfm?msg=3">
</cfif>
The holdRecord will hold the value of the select boxes selected like 3,4,5,6,7,8,9,10 and then i am moving them to the array so i can loop over array and delete the directory related to it.
But when i try to delete it..
It deletes the records based on the cfinvoke tag from the database. and then it comes to cfdirectory and say that the folder does not exists, while the folder do exist over there.
The paths i am using are correct and i have checked 10 times before posting here..
i ma storing the values in the session so they should not be removed but no luck, can anyone tell me how this can be resolved
Chers and regards
Thanks
Here is my Code
<cfif isdefined('form.realdel')>
<cfset session.holdRecord = ListToArray(#Form.thisCampSchool#)>
<cfinvoke
component="EcoLife.admin.CFC.users"
method="thisDelete">
<cfinvokeargument name="willgetDeleted" value="#trim(form.thisCampSchool)#"/>
</cfinvoke>
<cfloop index="x" array="#session.holdRecord#">
<cfoutput>
<cfdirectory action="delete" recurse="yes" directory="#websitename#attachments/schools/#x#">
</cfoutput>
</cfloop>
<cflocation addtoken="no" url="campadd.cfm?msg=3">
</cfif>
The holdRecord will hold the value of the select boxes selected like 3,4,5,6,7,8,9,10 and then i am moving them to the array so i can loop over array and delete the directory related to it.
But when i try to delete it..
It deletes the records based on the cfinvoke tag from the database. and then it comes to cfdirectory and say that the folder does not exists, while the folder do exist over there.
The paths i am using are correct and i have checked 10 times before posting here..
i ma storing the values in the session so they should not be removed but no luck, can anyone tell me how this can be resolved
Chers and regards
Thanks
