From: Giles Williams <[EMAIL PROTECTED]>

Is there an easy way to programmatically delete all of the files in a
folder?


Something like this will work. It is recursive, so it assumes your folder isn't too deep in terms of nested sub-folders.

Sub DeleteFolderItem(f as FolderItem)
   dim i as integer
if f=nil or not f.Exists then
      return
   end if
if not f.Directory then
      f.Delete
   else
      for i=f.Count downto 1
         DeleteFolderItem(f.TrueItem(i))
      next
      f.Delete
   end if
End Sub


Paul Rodman
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to