Move (command)
| Company type | Command |
|---|---|
| Industry | Computing / Software |
| Products | File and directory relocation and renaming |
move serves as a shell command designed to relocate and rename files as well as directories.
This command is incorporated in numerous shell environments, including COMMAND.COM, Command Prompt, 4DOS/4NT, and functions as an alias for the Move-Item Cmdlet within PowerShell.
It is supported on a variety of operating system platforms such as DOS, OS/2, Windows, and ReactOS. Specifically, it has been part of MS-DOS since version 6 onwards. Joe Cosentino developed the FreeDOS variant. Additionally, move is featured in DR DOS 6.0. The open-source MS-DOS emulator DOSBox does not include a MOVE command; instead, users rely on the REN command to reposition files.
In terms of functionality, move parallels the Unix mv command and shares similarities with OpenVOS commands move_file and move_dir.
Options
/y– Prevents prompting for confirmation when overwriting an existing file at the destination/-y– Forces a prompt to confirm before overwriting an existing destination file
By default, the command requests confirmation prior to overwriting unless executed within a batch file. The default prompt behavior can be configured through the /y setting in the COPYCMD environment variable, which can be overridden by specifying the /-y option on the command line.
Examples
When renaming or moving, if the target does not correspond to an existing directory, the file or directory is renamed accordingly. However, if the destination refers to a directory, the source is moved inside that directory, resulting in a new path.
> move foo bar