Auto Delete Hidden File when USB Connected?
Here's a Keyboard Maestro script that deletes a file when a partition is mounted:

              

If you want wildcards, it might be more useful to use a script action with rm:

rm /Volumes/volumename/.file*