Skip to content

MOVE command in Windows

The Windows move command is a built-in feature that enables users to quickly and easily move files and directories from one location to another. By using this command, you can efficiently organize your file system, rearrange data on your storage devices, and free up space when needed. The move command can be executed from the command prompt or PowerShell, providing a seamless way to manage your files and directories within the Windows operating system.

Terminal window
move [options] [source] [destination]
OptionDescription
/YSuppresses prompting to confirm overwrite
/-YPrompts to confirm overwrite
/ZCopies files in restartable mode
/AMoves only files ready for archiving
/JCopies using unbuffered I/O
/VVerifies each new file
ParameterDescription
sourceSpecifies the location of the file(s) to be moved
destinationSpecifies the destination location for the moved file(s)

Move a Single File to a Different Directory

Section titled “Move a Single File to a Different Directory”
Terminal window
move C:\Users\user1\file1.txt D:\Backup

Moves the file “file1.txt” from the user1 directory to the Backup directory.

Move Multiple Files to a Different Directory

Section titled “Move Multiple Files to a Different Directory”
Terminal window
move C:\Users\user1\file1.txt C:\Users\user1\file2.txt D:\Backup

Moves both file1.txt and file2.txt from the user1 directory to the Backup directory.

Terminal window
move C:\Users\user1\Documents D:\Backup

Moves the entire “Documents” directory from the user1 directory to the Backup directory.

Terminal window
move C:\Users\user1\file1.txt D:\Backup\newfile.txt

Moves file1.txt from the user1 directory to the Backup directory and renames it as newfile.txt.

Terminal window
move *.txt D:\Backup

Moves all .txt files from the current directory to the Backup directory.

Move Files Silently (No Prompt for Confirmation)

Section titled “Move Files Silently (No Prompt for Confirmation)”
Terminal window
move /Y C:\Users\user1\file1.txt D:\Backup

Moves file1.txt to the Backup directory without prompting for confirmation.

Move Files with Overwriting Existing Files

Section titled “Move Files with Overwriting Existing Files”
Terminal window
move /Y C:\Users\user1\file1.txt D:\Backup

Moves file1.txt from the user1 directory to the Backup directory and overwrites any existing file with the same name.

Move a Directory and Its Contents (Including Subdirectories)

Section titled “Move a Directory and Its Contents (Including Subdirectories)”
Terminal window
move C:\Users\user1\Documents D:\Backup /S

Moves the “Documents” directory and all its contents, including subdirectories, to the Backup directory.

To use the move command in Windows, execute the following command:

Terminal window
move <source> <destination>

What is the purpose of the move command in CMD?

Section titled “What is the purpose of the move command in CMD?”

The move command in CMD is used to move files from one location to another. It is helpful for organizing files or transferring them to different directories.

How can I move a file to a different directory using CMD?

Section titled “How can I move a file to a different directory using CMD?”

You can move a file to a different directory by specifying the source file location and the destination directory in the move command.

Terminal window
move C:\example\file.txt D:\new_directory\

Can I rename a file while moving it using the move command?

Section titled “Can I rename a file while moving it using the move command?”

Yes, you can rename a file while moving it by specifying the new file name in the destination path.

Terminal window
move C:\example\file.txt C:\new_location\new_file.txt

Is it possible to move multiple files at once with the move command?

Section titled “Is it possible to move multiple files at once with the move command?”

Yes, you can move multiple files at once by specifying multiple source files and a destination directory in the move command.

Terminal window
move C:\example\file1.txt C:\example\file2.txt D:\new_directory\

How do I force the move command to overwrite existing files?

Section titled “How do I force the move command to overwrite existing files?”

To force the move command to overwrite existing files without prompting, use the /Y option.

Terminal window
move /Y C:\example\file.txt D:\new_directory\

Can I move directories using the move command in Windows CMD?

Section titled “Can I move directories using the move command in Windows CMD?”

Yes, you can move directories using the move command by specifying the source directory and the destination directory.

Terminal window
move C:\example\directory D:\new_location\

How can I move a file but retain a copy in the original location?

Section titled “How can I move a file but retain a copy in the original location?”

To move a file but retain a copy in the original location, use the copy command followed by the move command.

Terminal window
copy C:\example\file.txt D:\new_directory\
move C:\example\file.txt C:\backup_location\
  • Renaming files or directories
  • Moving files or directories to a different location
  • Consolidating files from multiple locations into a single directory
  • Organizing files by moving them to specific folders
  • Updating file paths in batch scripts or commands