I can't see anything in your code that tries to delete the folder.
swFeature.ModifyDefinition(swFeature.GetDefinition, g_swDoc, Nothing)
why don't you use:
swFeature.Select2 False, 0
Note that if you delete the feature, you cannot continue to process the next feature - you have to start from the beginning again, but that shouldn't be a problem.
Thanks! Worked perfectly.