How to call SHFileOperation API to recursively delete files and folders

This example on GitHub uses all Clarion code (e.g. DIRECTORY) to recursively load files into a Queue and display in a LIST. It does a Rename on files but you could change it to do a DeleteFile() or Remove(). You get a Window with a Progress bar.

You can remove the link and call to SHAutoComplete() which is used to auto fill the folder.

Be careful with SHFileOperationA() as sending it bad parameters may delete the wrong stuff, like your project or everything.