thanks for that dave, but i've been using your code for a while and noticed an error with it

when a filename includes the character ' ($chr(39)), it stuffs up and doesnt close it.

eg. /window -c "Send nickname something'with'chr39.mp3"

but /close -g# is perfect for what i'm doing
thank you both!