Solved

powershell command to copy and paste files

Posted on 2015-01-04
4
380 Views
Last Modified: 2015-01-04
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
0
Comment
Question by:jamesmetcalf74
  • 2
4 Comments
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
Do you want to have the same folder structure in the destination, or have all files in a single folder?
0
 

Author Comment

by:jamesmetcalf74
Comment Utility
single folder
0
 
LVL 39

Accepted Solution

by:
footech earned 500 total points
Comment Utility
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

0
 

Author Closing Comment

by:jamesmetcalf74
Comment Utility
that did the trick
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article shows how a content item can be identified directly or through translation of a navigation type. It then shows how this information can be used to create a menu for further navigation.
How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now