move command (Windows / CMD)
What it does
Move files or rename files and directories. Searches for the move command cmd usually need CMD syntax, practical switches, and notes on how it compares with PowerShell or Linux alternatives. This page covers syntax, common options, and copyable examples for Command Prompt.
Move files or rename files and directories.
Syntax
move [/Y | /-Y] [source] [target]
Common options
| Flag / option | Meaning |
|---|---|
| /Y | Suppress confirmation before overwrite. |
| /-Y | Prompt before overwrite. |
| source | Select one or more files to move. |
| target | Set the destination folder or new name. |
Practical examples
Rename file
move draft.txt final.txt
Renames draft.txt in place.
Move logs
move *.log C:\Logs\Archive\
Moves matching logs to Archive.
Prompt on conflict
move /-Y report.csv D:\Reports\
Asks before replacing a file.
Linux ↔ Windows equivalent
Closest match: mv (Linux / bash / sh / zsh). Move or rename files and directories.
Common mistakes
- Assuming move always asks before overwriting.
- Leaving paths containing spaces unquoted.
Related commands
- copyCopy one or more files and optionally combine text or binary files.
- delPermanently delete one or more files.
- Move-ItemMove or rename items in filesystem and other providers.
- 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 do in Command Prompt?
Move files or rename files and directories.
How do I run move in CMD?
Open Command Prompt and follow `move [/Y | /-Y] [source] [target]`; quote paths containing spaces.
What is a practical move example in CMD?
Try `move draft.txt final.txt` — Renames draft.txt in place.
Can move be used in a batch file?
Yes. Check its exit code and escape CMD metacharacters when input is variable.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.