How to move or rename files
Overview
move relocates an item and can rename it at the destination. ren (or rename) changes a name in the same folder.
Moving within one drive is usually quick. Moving across drives copies and then removes the source, so large moves take longer.
- For
ren, the new name is normally a name, not a different path. - A folder destination should already exist.
- Use
diron both source and destination after a move.
Commands to try
Type each command at the prompt, then press Enter. Replace sample names and paths with ones that exist on your computer.
Commands are generally not case-sensitive, but preserving the spelling shown here makes scripts easier to read.
ren draft.txt final.txt
move final.txt Archive\
move "Old Folder" "New Folder"
move /-y report.txt Archive\report.txt
Useful options and details
Options change how a command behaves. Add spaces exactly as shown, and use the command's built-in help when an option is unfamiliar.
A path containing spaces must be enclosed in double quotes, such as "C:\My Files".
/-yasks before overwriting an existing destination./ysuppresses overwrite confirmation and is riskier.- Wildcards are supported but should be previewed first.
Tips and common mistakes
Check the current folder and read the command output before assuming an operation succeeded.
Practice with disposable files first. Commands that delete, overwrite, or stop a process may not offer an Undo button.
- Open programs may lock files and prevent a move.
- Moving a shortcut is different from moving the file it points to.
- Avoid renaming system or installed-program folders.
Safe practice
Create a temporary practice folder under your user profile so the examples cannot affect Windows system files.
After each command, inspect the result with dir or another read-only command before continuing.
- Rename a copied practice file.
- Move it into an Archive subfolder.
- Verify that it left the source and reached the destination.