Command referenceMove-Item
Move-Item command (Windows / PowerShell)
What it does
Move or rename items in filesystem and other providers. Guides covering the move-item powershell usually need pipeline-friendly examples, common parameters, and how the cmdlet compares with classic CMD or Linux tools. This page includes syntax, options, and copyable PowerShell examples.
Move or rename items in filesystem and other providers.
Syntax
Move-Item [-Path] <String[]> [[-Destination] <String>] [-Force] [-PassThru]
Common options
| Flag / option | Meaning |
|---|---|
| -Destination | Set the new parent path or item name. |
| -Force | Move items that cannot otherwise be changed. |
| -LiteralPath | Use a path without wildcard expansion. |
| -PassThru | Return the moved item. |
Practical examples
Rename file
Move-Item draft.txt final.txt
Renames the file in its current directory.
Move logs
Move-Item .\*.log D:\Logs\Archive\
Moves matching logs.
Return result
Move-Item report.csv D:\Reports -PassThru
Moves and emits the resulting item.
Linux ↔ Windows equivalent
Closest match: mv (Linux / bash / sh / zsh). Move or rename files and directories.
Common mistakes
- Assuming moving a directory into an existing directory always merges contents.
- Using a wildcard source without reviewing all matches.
Related commands
- Copy-ItemCopy items between locations supported by PowerShell providers.
- Remove-ItemDelete provider items such as files, directories, registry keys, and variables.
- moveMove files or rename files and directories.
- lsList directory entries and inspect file metadata.
- cdChange the shell's current working directory.
- dirList files and subdirectories with names, dates, sizes, and attributes.
- findWalk directory trees and select entries using tests and actions.
- Get-ChildItemEnumerate items and child items in filesystem, registry, and other providers.
FAQ
What does Move-Item do in PowerShell?
Move or rename items in filesystem and other providers.
How can I see examples for Move-Item?
Run `Get-Help Move-Item -Examples`, then adapt an example to the provider and objects you are using.
What is a practical Move-Item example?
Try `Move-Item draft.txt final.txt` — Renames the file in its current directory.
Does Move-Item return text or objects?
Move-Item normally participates in PowerShell's object pipeline; formatting seen in the console is a view of those objects.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.