{{Short description|Shell command for moving files}} {{lowercase title}} {{Infobox software | name = move | logo = | screenshot = ReactOS-0.4.13 move command 667x434.png | screenshot size = | caption = The ReactOS <code>move</code> command | developer = Microsoft, IBM, JP Software, DR, Novell, Joe Cosentino, ReactOS Contributors | released = | latest release version = | latest release date = | programming language = FreeDOS, ReactOS: C | operating system = MS-DOS, PC DOS, MSX-DOS, OS/2, eComStation, ArcaOS, Windows, DR DOS, FreeDOS, ReactOS | platform = Cross-platform | genre = Command | license = FreeDOS, ReactOS: GPLv2 | website = }} '''<code>move</code>''' is a shell command for renaming and moving files and directories.<ref>[https://www.computerhope.com/movehlp.htm MS-DOS and Windows command line move command]</ref>
The command is in various shells including COMMAND.COM, Command Prompt,<ref>{{cite web |url=https://technet.microsoft.com/en-us/library/bb490935.aspx |title=Move |work=Microsoft Docs |date=11 September 2009 |access-date=2017-08-26 |url-status=live |archive-url=https://web.archive.org/web/20170826175654/https://technet.microsoft.com/en-us/library/bb490935.aspx |archive-date=2017-08-26 }} Microsoft TechNet Move article</ref> 4DOS/4NT. In PowerShell, {{code|move}} is a predefined command alias for the <code>Move-Item</code> Cmdlet which serves the same essential purpose.
The command is available in various operating systems including DOS,<ref name="Jamsa1993">{{Citation |last1 = Jamsa |first1 = Kris A. |title = DOS: The Complete Reference |publisher = Osborne McGraw-Hill |page = 206 |year = 1993 |isbn = 0078819040 |url = https://books.google.com/books?id=UW9GAAAAYAAJ |postscript = . |url-status = live |archive-url = https://web.archive.org/web/20180125142934/https://books.google.com/books?id=UW9GAAAAYAAJ |archive-date = 2018-01-25 }}</ref> OS/2,<ref>{{cite web |url=http://www.jatomes.com/Help/Os2Cmd.php#MOVE |title=JaTomes Help - OS/2 Commands |website=www.jatomes.com |url-status=dead |archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php |archive-date=2019-04-14}} </ref> Windows and ReactOS.<ref>{{cite web |url=https://github.com/reactos/reactos/blob/master/base/shell/cmd/move.c |title=reactos/move.c at master |website=GitHub |url-status=live |archive-url=https://web.archive.org/web/20191001164803/https://github.com/reactos/reactos/blob/master/base/shell/cmd/move.c |archive-date=2019-10-01}}</ref> On MS-DOS, the command is available in versions 6 and later.<ref name="RUNNINGMSDOS">{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=Microsoft Press|isbn=0-7356-1812-7}}</ref> The FreeDOS version was developed by Joe Cosentino.<ref>[http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/move.html ibiblio.org FreeDOS Package -- Move (FreeDOS Base)]</ref> DR DOS 6.0 includes an implementation of the {{code|move}} command.<ref name="drdos6userguide">{{Cite web |url=https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |title=DR DOS 6.0 User Guide Optimisation and Configuration Tips |access-date=2019-08-12 |archive-url=https://web.archive.org/web/20190930135943/http://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |archive-date=2019-09-30 |url-status=dead }}</ref> The open-source MS-DOS emulator DOSBox has no <code>MOVE</code> command. Instead, the <code>REN</code> command can be used to move files.<ref>[https://www.dosbox.com/wiki/Commands Commands - DOSBoxWiki]</ref>
The command is analogous to the Unix-based <code>mv</code> command and to the OpenVOS <code>move_file</code> and <code>move_dir</code>commands.<ref>{{cite web |url=http://stratadoc.stratus.com/vos/19.1.0/r098-19/wwhelp/wwhimpl/common/html/r098-19.pdf |title=OpenVOS Commands Reference Manual |work=StrataDOC Online Documentation Service for Stratus Products |quote="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." |pages=2-552, 2-558 |access-date=October 1, 2019 |url-status=dead |archive-url=https://web.archive.org/web/20190922035829/https://stratadoc.stratus.com/vos/19.1.0/r098-19/wwhelp/wwhimpl/common/html/r098-19.pdf |archive-date=2019-09-22 }}</ref>
==Options== * <code>/y</code> {{endash}} Suppress prompting to confirm overwriting an existing destination file * <code>/-y</code> {{endash}} Prompt to confirm overwriting an existing destination file
By default, the command prompts to overwrite unless executed in a batch script. The default can be modified by including the <code>/y</code> option in the <code>COPYCMD</code> environment variable. Then, that can be overridden via the <code>/-y</code> command-line option.
==Examples==
The following command renames a file or directory {{code|foo}} to {{code|bar}} if {{code|bar}} is not an existing directory. If it is an existing directory, then {{code|foo}} is moved into {{code|bar}} and is then at path {{code|bar\foo}}.
> move foo bar
==See also== *List of DOS commands *List of POSIX commands
==References== {{Reflist}}
==Further reading== *{{Cite book|author-last=Wolverton|author-first=Van|title=MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition|date=1990|publisher=Microsoft Press|isbn=978-1556152894}} *{{Cite book|author1=Kathy Ivens|author2=Brian Proffit|year=1993|title=OS/2 Inside & Out|publisher=Osborne McGraw-Hill|isbn=978-0078818714}} *{{Cite book|first=Æleen|last=Frisch|year=2001|title=Windows 2000 Commands Pocket Reference|publisher=O'Reilly|isbn=978-0-596-00148-3}}
==External links== {{Wikibooks|Guide to Windows Commands}} *[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/move move | Microsoft Docs]
{{Windows commands}}
Category:External DOS commands Category:OS/2 commands Category:ReactOS commands Category:Windows commands Category:Microcomputer software Category:MSX-DOS commands Category:Windows administration