Move (command)

move

The ReactOS `move` command

Developer(s)| Microsoft, IBM, JP Software, DR, Novell, Joe Cosentino, ReactOS Contributors
Written in| FreeDOS, ReactOS: C
Operating system| MS-DOS, PC DOS, MSX-DOS, OS/2, eComStation, ArcaOS, Windows, DR DOS, FreeDOS, ReactOS
Platform| Cross-platform
Type| Command
License| FreeDOS, ReactOS: GPLv2

In computing, `move` is a command in various command-line interpreters (shells) such as `COMMAND.COM`, `cmd.exe`,[1] 4DOS/4NT, and PowerShell. It is used to move one or more files or directories from one place to another.[2] 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_dir`commands.[3]

## Implementations[edit]

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

## Syntax[edit]

To move one or more files:

MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

To rename a directory:

MOVE [/Y | /-Y] [drive:][path]dirname1 [destination\]dirname2

To move a directory:

MOVE [/Y | /-Y] [drive:][path]dirname1 destination

### Parameters[edit]

* `[drive:][path]filename1`: Specifies the location and name of the file or files you want to move.
* `destination`: Specifies the new location of the file or directory. Destination can consist of a drive letter and colon, a directory name, or a combination, and must already exist. If you are moving only one file, you can also include a filename if you want to rename the file when you move it.
* `[drive:][path]dirname1`: Specifies the directory you want to rename or move.
* `dirname2`: Specifies the new name of the directory.
* `/Y`: Suppresses prompting to confirm you want to overwrite an existing destination file.
* `/-Y`: Causes prompting to confirm you want to overwrite an existing destination file.

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.

### Notes[edit]

* When moving a directory, `dirname1` and its contents wind up as a subfolder beneath `destination`. Caution is advised - if the final subfolder of the destination path does not exist, `dirname1` will be both moved and renamed.

## See also[edit]

* List of DOS commands
* List of Unix commands

## References[edit]

1. ^ "Move". Microsoft Docs. 11 September 2009. Archived from the original on 2017-08-26. Retrieved 2017-08-26. Microsoft TechNet Move article
2. ^ MS-DOS and Windows command line move command
3. ^ "OpenVOS Commands Reference Manual" (PDF). StrataDOC Online Documentation Service for Stratus Products. pp. 2–552, 2–558. Archived from the original (PDF) on 2019-09-22. Retrieved October 1, 2019. "move_dir: Purpose: This command moves a directory and its contents from one place to another. ... move_file: Purpose: This command moves a file or set of files to another file or directory."
4. ^ Jamsa, Kris A. (1993), DOS: The Complete Reference, Osborne McGraw-Hill, p. 206, ISBN 0078819040, archived from the original on 2018-01-25.
5. ^ "JaTomes Help - OS/2 Commands". www.jatomes.com. Archived from the original on 2019-04-14.
6. ^ "reactos/move.c at master". GitHub. Archived from the original on 2019-10-01.
7. ^ Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
8. ^ ibiblio.org FreeDOS Package -- Move (FreeDOS Base)
9. ^ "DR DOS 6.0 User Guide Optimisation and Configuration Tips" (PDF). Archived from the original (PDF) on 2019-09-30. Retrieved 2019-08-12.
10. ^ Commands - DOSBoxWiki

## Further reading[edit]

* Wolverton, Van (1990). MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition. Microsoft Press. ISBN 978-1556152894.
* Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714.
* Frisch, Æleen (2001). Windows 2000 Commands Pocket Reference. O'Reilly. ISBN 978-0-596-00148-3.

## External links[edit]

Wikibooks has a book on the topic of: Guide to Windows Commands

* move | Microsoft Docs

* v
* t
* e

Windows command-line programs and shell builtins

* COMMAND.COM
* Command Prompt
* Windows PowerShell
* Recovery Console

File system navigation|

* cd (chdir)
* dir
* popd
* pushd
* tree

File management|

* attrib
* cacls
* cipher
* compact
* copy
* del (erase)
* deltree
* icacls
* mkdir (md)
* mklink
* move
* openfiles
* recover
* ren (rename)
* replace
* rmdir (rd)
* robocopy
* takeown
* xcopy

Archiving|

* expand
* extrac32
* extract
* makecab
* pax
* tar

Disk management|

* chkdsk
* convert
* defrag
* diskcomp
* diskcopy
* diskpart
* diskraid
* diskshadow
* drvspace
* fdisk
* format
* fsutil
* label
* manage-bde
* refsutil
* subst
* scandisk
* sys
* vol
* vssadmin

Processes|

* at
* exit
* kill
* powercfg
* runas
* sc
* schtasks
* shutdown
* start
* taskkill
* tasklist

Registry|

* assoc
* ftype
* reg
* regini
* regsvr32

User environment|

* chcp
* cmdkey
* date
* graftabl
* mode
* path
* set
* setver
* setx
* time
* title
* ver
* where
* whoami

File contents|

* comp
* edit
* edlin
* fc
* find
* findstr
* print
* type

Scripting|

* choice
* clip
* cscript
* doskey
* echo
* for
* forfiles
* goto
* if
* more
* pause
* prompt
* rem
* timeout

Networking|

* arp
* bitsadmin
* curl
* getmac
* hostname
* ipconfig
* nbtstat
* net
* netsh
* netstat
* nslookup
* PathPing
* ping
* rpcping
* route
* scp
* setspn
* sftp
* ssh
* ssh-add
* ssh-agent
* ssh-keygen
* ssh-keyscan
* tracert
* winrm
* winrs

Maintenance and care|

* auditpol
* dispdiag
* driverquery
* eventcreate
* eventtriggers
* logman
* mofcomp
* msiexec
* ntbackup
* pnpunattend
* pnputil
* REAgentC
* relog
* sfc
* sxstrace
* systeminfo
* tracerpt
* typeperf
* w32tm
* WBAdmin
* wecutil
* wevtutil
* winmgmt
* winsat
* wmic

Boot management|

* bcdedit
* bootcfg
* bootsect
* fixboot
* fixmbr

Software development|

* debug
* exe2bin
* QBasic

Miscellaneous|

* break
* cls
* dism
* dpath
* gpresult
* gpupdate
* help
* MSCDEX
* pentnt
* tpmtool
* tpmvscmgr
* wsl

* List of DOS commands
* Environment variables
* Windows Support Tools

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template