- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to copy multiple files in PowerShell using Copy-Item?
To copy the multiple files in PowerShell, you need to separate each file with the comma (,).
In the below example, we will copy multiple files from the source to the destination folder D:\TempContent.
Copy-Item .\PowerShellcommands.csv,.\cars.xml -Destination D:\TempContent\ -PassThru
PS D:\Temp> Copy-Item .\PowerShellcommands.csv,.\cars.xml -Destination D:\TempContent\ -PassThru Directory: D:\TempContent Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 20-01-2020 12:10 1148809 PowerShellcommands.csv -a---- 07-05-2018 23:00 301 cars.xml
- Related Articles
- How to copy files of the specific extension using PowerShell?
- How to copy files with the specific extension in PowerShell?
- What is Copy-item in PowerShell used for?
- How to copy only updated or newer files with PowerShell?
- How to copy readonly and hidden files/folders in the PowerShell?
- How to Copy NTFS permissions using PowerShell?
- How to copy files/folders to the remote location in the PowerShell?
- How to copy files to a new directory using Python?
- How to copy files from one folder to another using Python?
- How to copy files from one server to another using Python?
- How to Copy files or Folder without overwriting existing files?
- How to copy files into a directory in C#?
- How to copy certain files from one folder to another using Python?
- How to copy items from one location to another location using PowerShell?
- How to copy files from host to Docker container?