The text in the .bat file should read as this :
@echo off
set /a num=%random% %%
n + 1
SET spath="
soundFolder\specificSoundFX (%num%).wav"
"
mediaPlayerFolder\mediaPlayer.exe" %spath%
where
n is the total number of variations you have for the sound in question. Also, every sound file associated with your effect should be named the same with an ascending number in brackets, something like crossbow (1), crossbow (2), crossbow (3), etc. This is easily done by selecting all corresponding files and pressing F2 before entering the appropriate name.
Once the .bat file is saved, you need to create a minimized shortcut for it to open silently and you need to make sure your media player is configured to open a single instance.
Anyway, a quick video might best show how it works :
https://youtu.be/VVgbcw18b3A