Ok, let me try ONE more time with the right command"S"... @echo off rmdir C:\mydir /Q /S mkdir C:\mydir
this would delete the directory and recreate it since, like Jim said, I don't believe there is a single DOS command that is equivalent to the linux command he posted (you would need quotes around the FULL path if there are spaces in it anywhere.) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Monday, January 16, 2006 6:44 PM To: CF-Talk Subject: RE: Delete directory contents Better yet... rmdir c:\mydir /Q /S ...:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Monday, January 16, 2006 6:38 PM To: CF-Talk Subject: RE: Delete directory contents In windows... echo y|rmdir c:\mydir /S ....:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: Jim Wright [mailto:[EMAIL PROTECTED] Sent: Monday, January 16, 2006 6:27 PM To: CF-Talk Subject: Re: Delete directory contents Using Bobby's method, if it is *nix, rm -r -f path/* would do it. I don't think the del or rmdir commands in windows will handle this situation. On 1/16/06, Bobby Hartsfield <[EMAIL PROTECTED]> wrote: > You could cfececute a batch file/shell script or native command to delete > "path\*.*" else, I think you'll be stuck with having to cfdirectory the > directory then loop over the results and delete each individual file. I'm > still on 6.1 here so I don't know whether or not CF7 has made this easier. > > ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > > > > -----Original Message----- > From: Ken [mailto:[EMAIL PROTECTED] > Sent: Monday, January 16, 2006 1:10 PM > To: CF-Talk > Subject: Delete directory contents > > Hi. Is there a custom function to empty the contents of a folder. I want to > keep the folder. Just delete all files in it. > > Thanks, > Ken > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229725 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54