Copy-Item is the PowerShell cmdlet that copies files and folders. Give it a -Path and a -Destination, and add -Recurse when you’re copying a folder with everything inside it:
Copy-Item -Path C:\psfaqs\Reports\q3-sales.xlsx -Destination C:\psfaqs\Backup
Get-ChildItem -Path C:\psfaqs\Backup -Name
Output:
q3-sales.xlsx
That’s the whole idea. The details matter, though, because Copy-Item has a few habits that surprise people, like creating a file where you expected a folder, or nesting a folder inside itself on the second run.
I’ll walk through each case with the output I got in PowerShell 7.6 and Windows PowerShell 5.1. Both versions behaved the same in every example here.
Copy-Item syntax and parameters
Copy-Item [-Path] <string[]> [[-Destination] <string>] [-Recurse] [-Force]
[-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-PassThru] [-WhatIf]
| Parameter | What it does |
|---|---|
-Path | The file or folder to copy. Wildcards such as *.xlsx are allowed |
-Destination | Where the copy goes. Put a new file name here to rename while copying |
-Recurse | Copies a folder’s subfolders and files, not just the top level |
-Force | Copies over read-only files |
-Filter | One wildcard pattern, applied by the file system (fastest) |
-Include / -Exclude | One or more patterns; they only work when -Path ends in \* |
-PassThru | Returns the copied items, so you can see what was copied |
-WhatIf | Shows what would be copied without copying anything |
You’ll also see the aliases copy, cp and cpi in other people’s scripts. They all run Copy-Item, but spell it out in scripts you share.
Copy-Item always leaves the original in place. If you want the file gone from the source, move the file to a folder with Move-Item instead.
Copy a file and rename it
To copy and rename in one step, put the new file name in -Destination. Here I add today’s date to the name:
$today = Get-Date -Format 'yyyy-MM-dd'
Copy-Item -Path C:\psfaqs\Reports\q3-sales.xlsx -Destination "C:\psfaqs\Backup\q3-sales-$today.xlsx"
Get-ChildItem -Path C:\psfaqs\Backup -Name
Output:
q3-sales-2026-10-25.xlsx
For more renaming patterns, see how to copy and rename files in PowerShell.
How do I copy files from one folder to another in PowerShell?
Add \* to the end of the source folder and use -Recurse. This copies everything inside Reports, including the Monthly subfolder, straight into Backup:
Copy-Item -Path C:\psfaqs\Reports\* -Destination C:\psfaqs\Backup -Recurse
Get-ChildItem -Path C:\psfaqs\Backup -Recurse -Name
Output: