From the command line (no batch):
for /d %F in (e:\*) do @if /i "%F" neq "e:\wav" 2>nul xcopy "%F\*.wav" "e:\wav"
The above will only copy files from the root level folders. If you want all .wav
files from the entire drive, then you need:
for /r "e:\" %F in (.) do @if /i "%F" neq "e:\wav\." 2>nul xcopy "%F\*.wav" "e:\wav"
Double up the percents if you put the command in a batch file.
Note that different files that share the same name from different folders will collide - only one will survive in your \wav folder.