Move (command)

Shell command for moving files


title: "Move (command)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["external-dos-commands", "os/2-commands", "reactos-commands", "windows-commands", "microcomputer-software", "msx-dos-commands", "windows-administration"] description: "Shell command for moving files" topic_path: "technology/operating-systems" source: "https://en.wikipedia.org/wiki/Move_(command)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Shell command for moving files ::

::data[format=table title="Infobox software"]

FieldValue
namemove
screenshotReactOS-0.4.13 move command 667x434.png
captionThe ReactOS move command
developerMicrosoft, IBM, JP Software, DR, Novell, Joe Cosentino, ReactOS Contributors
programming languageFreeDOS, ReactOS: C
operating systemMS-DOS, PC DOS, MSX-DOS, OS/2, eComStation, ArcaOS, Windows, DR DOS, FreeDOS, ReactOS
platformCross-platform
genreCommand
licenseFreeDOS, ReactOS: GPLv2
::

| name = move | logo = | screenshot = ReactOS-0.4.13 move command 667x434.png | screenshot size = | caption = The ReactOS move 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 = move is a shell command for renaming and moving files and directories.

The command is in various shells including COMMAND.COM, Command Prompt, 4DOS/4NT. In PowerShell, is a predefined command alias for the Move-Item Cmdlet which serves the same essential purpose.

The command is available in various operating systems including DOS,{{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

The command is analogous to the Unix-based [mv](mv-unix) command and to the OpenVOS move_file and move_dircommands.

Options

  • /y Suppress prompting to confirm overwriting an existing destination file
  • /-y 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 /y option in the COPYCMD environment variable. Then, that can be overridden via the /-y command-line option.

Examples

The following command renames a file or directory to if is not an existing directory. If it is an existing directory, then is moved into and is then at path .

move foo bar

References

References

  1. [https://www.computerhope.com/movehlp.htm MS-DOS and Windows command line move command]
  2. (11 September 2009). "Move". Microsoft Docs.
  3. "JaTomes Help - OS/2 Commands".
  4. "reactos/move.c at master".
  5. (2003). "Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition". [[Microsoft Press]].
  6. [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)]
  7. "DR DOS 6.0 User Guide Optimisation and Configuration Tips".
  8. [https://www.dosbox.com/wiki/Commands Commands - DOSBoxWiki]
  9. "OpenVOS Commands Reference Manual". StrataDOC Online Documentation Service for Stratus Products.

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

external-dos-commandsos/2-commandsreactos-commandswindows-commandsmicrocomputer-softwaremsx-dos-commandswindows-administration