RE: Recursive File Delete

2002-12-03 Thread Ryan Farrell
cfdirectory action=list directory=mydirectory name=dirlist cfoutput query=dirlist cffile action=delete file=#name# /cfoutput Ryan -Original Message- From: David Adams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 3:22 PM To: CF-Talk Subject: Recursive File

RE: Recursive File Delete

2002-12-03 Thread Lofback, Chris
CFSET TargetDir = c:\foo CFDIRECTORY ACTION=LIST DIRECTORY=#TargetDir# NAME=TheFiles CFLOOP QUERY=TheFiles CFIF (Type IS File) AND (Name IS NOT .) AND (Name IS NOT ..) CFFILE ACTION=DELETE FILE=#TargetDir#\#Name# /CFIF /CFLOOP Chris Lofback Sr. Web Developer TRX

RE: Recursive File Delete

2002-12-03 Thread Joshua Miller
cfset root=c:\inetpub\wwwroot\yourdirectory\ cfdirectory name=dGetDir directory=#root# action=List cfloop query=dGetDir cfif type NEQ DIR cffile action=DELETE file=#root##dGetDir.name# variable=content /cffile /cfloop That'll delete everything but sub-directories

Re: Recursive File Delete

2002-12-03 Thread S . Isaac Dealey
I am looking for a simple block of code that will loop through a directory and delete it's files when called. I do NOT want to delete the directory, only its contents. Pseudo code: Set CurrentDirectory For each file in directory Delete it Next. I am sure this is easy for some of you

Re: Recursive File Delete

2002-12-03 Thread Jochem van Dieten
David Adams wrote: I am looking for a simple block of code that will loop through a directory and delete it's files when called. I do NOT want to delete the directory, only its contents. Why loop? cfexecute name=c:\winnt\system32\cmd.exe parameters=/c del c:\trash\*.* /q /

Re: Recursive File Delete

2002-12-03 Thread S . Isaac Dealey
David Adams wrote: I am looking for a simple block of code that will loop through a directory and delete it's files when called. I do NOT want to delete the directory, only its contents. Why loop? cfexecute name=c:\winnt\system32\cmd.exe parameters=/c del c:\trash\*.* /q /

RE: Recursive File Delete

2002-12-03 Thread Rob Rohan
Subject: Re: Recursive File Delete David Adams wrote: I am looking for a simple block of code that will loop through a directory and delete it's files when called. I do NOT want to delete the directory, only its contents. Why loop? cfexecute name=c:\winnt\system32\cmd.exe

RE: Recursive File Delete

2002-12-03 Thread Jim Davis
a delete in there. Jim Davis -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 4:48 PM To: CF-Talk Subject: Re: Recursive File Delete I am looking for a simple block of code that will loop through a directory and delete it's