I am trying to move all .mp3
and .wav
files from one folder to another, while leaving the relative path of the files the same.
Imagine a directory structure that looks like this:
DirA
subfolder_1
song.mp3
subfolder_subfolder
dj.wav
somefile.txt
kittens.jpg
subfolder_2
txt.png
bass.wav
I want to copy the files from DirA
into DirB
, so that DirB
will look like:
DirB
subfolder_1
song.mp3
subfolder_subfolder
dj.wav
bass.wav
Any folder that does not contain any audio files should not be copied over.
I could write a Python or Node.JS script for this or something like that, but I was hoping there would be an easier solution using just PowerShell.