Help modifying the Import to Selected Group and Delete script

This is what I was thinking of:

I’ll follow this later this evening unless advised there’s a better method.