Skip to main content

Command referencemove

move command (Windows / CMD)

WindowsCMDfilebeginner

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 / optionMeaning
/YSuppress confirmation before overwrite.
/-YPrompt before overwrite.
sourceSelect one or more files to move.
targetSet 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.

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.