MOVE

The description below is from the book
DOS the Easy Way by Everett Murdock Ph.D.

CLICK HERE for information about downloading the book.

Type: Internal (6.0 and later)

Syntax:

MOVE [/Y|/-Y] [d:][path]filename[,[d:][path]filename[...]] destination

Purpose: Moves one or more files to the location you specify. Can also be used to rename directories.

Discussion

To move a file or files, you specify the name and location of the file or files you want to move followed by the destination. The destination specifies the new location of the file, or the new name of the directory. The destination can consist of a drive letter followed by a colon, a directory name, or a combination. If you are moving only one file, you can also specify a filename. If you are moving more than one file, the destination must be a directory name. If you move a file to an existing file, it will be overwritten.

Options

/Y - Use this option if you want MOVE to replace existing file(s) without prompting you for a confirmation. Otherwise, the replacement will not be made until you confirm it. If you use MOVE as part of a batch file, existing files will be replaced without a confirmation prompt. This option will override all defaults as well as the current setting of the COPYCMD environment variable.

/-Y - Use this option if you want MOVE to provide a confirmation prompt before replacing an existing file. This option will override all defaults as well as the current setting of the COPYCMD environment variable.

Examples

If you want to move two files named LETTER1 and LETTER2 from the current directory to the \MEMOS directory on drive C, enter the following:

move letter1, letter2 c:\memos

To rename the 89MEMOS directory on drive C to 90MEMOS, enter the following:

move c:\89memos c:\90memos



For more information about this command, refer to the downloadable book DOS the Easy Way.



Back to the Easy DOS Command Index