powershell command to copy and paste files

I have a folder with multiple folders and sub-folders in those folders.
there are mp3 files in all of the folders underneath my main folder called music.

can i get cmd syntax for powershell to copy all mp3 files under the folder music and its subfolders and then paste it in a folder called music1 under c drive
Who is Participating?
footechConnect With a Mentor Commented:
The following should do what you want.  You can change the paths as appropriate.
Get-ChildItem -Path c:\music -filter *.mp3 -recurse | Copy-Item -Destination c:\music1

Open in new window

Do you want to have the same folder structure in the destination, or have all files in a single folder?
jamesmetcalf74Author Commented:
single folder
jamesmetcalf74Author Commented:
that did the trick
All Courses

From novice to tech pro — start learning today.