Move (command)


In computing, move is a command in various command-line interpreters such as COMMAND.COM, cmd.exe, 4DOS/4NT, and PowerShell. It is used to move one or more files or directories from one place to another. The original file is deleted, and the new file may have the same or a different name. The command is analogous to the Unix mv command and to the OpenVOS move_file and move_dircommands.

Implementations

The command is available in DOS, IBM OS/2, Microsoft Windows and ReactOS. On MS-DOS, the command is available in versions 6 and later. In Windows PowerShell, is a predefined command alias for the Move-Item Cmdlet which basically serves the same purpose. The FreeDOS version was developed by Joe Cosentino. DR DOS 6.0 includes an implementation of the command. The open-source MS-DOS emulator DOSBox has no MOVE command. Instead, the REN command can be used to move files.

Syntax

To move one or more files:
MOVE filename1 destination
To rename a directory:
MOVE dirname1 dirname2
To move a directory:
MOVE dirname1 destination

Parameters

The switch /Y may be present in the COPYCMD environment variable. This may be overridden with /-Y on the command line. Default is to prompt on overwrites unless MOVE command is being executed from within a batch script.