>Has anyone written a function to do this?
>
I haven't seen one if VFP; I've written code to recurse a directory structure to pick up files and subdirectories, and then deleted/RMDIR'd in reverse to do something like this. You'll need to make API calls to remove file attributes as needed.
An easier solution would be to install the Windows Scripting Host (it's already a part of Win98 and NT's Option pack 4, and can be added via a standalone runtime distribution module available from Microsoft's web site.) WSH includes the Scripting.FileSystemObject automation object; the DeleteFolder method behaves exactly as you'd want it to.
>Thanks
>Wayne