> Commands A-M
> Commands M
Moves one or more files to the location you specify. The MOVE
command can also be used to rename directories.
- Specifies the new location of the file, or the new name of
the directory. Destination can consist of a drive letter and
colon, a directory name, or a combination. If you are moving only
one file, you can also specify a filename if you want to rename
the file when you move it. If you are moving more than one file,
the destination must be a directory name. Moving a file to an
existing file overwrites the existing file.
- Specifies the location and name of the file or files you want
to move. Also specifies the name of a directory you want to
- Displays help.
- Indicates that you want MOVE to prompt you for confirmation
when replacing an existing file. Specifying this switch overrides
all defaults and the current setting of the
- Indicates that you want MOVE to replace existing file(s)
without prompting you for confirmation. By default, if you
specify an existing file as the destination file, MOVE will ask
you if you want to overwrite the existing file. (Previous
versions of DOS would simply replace the existing file.) If
the MOVE command is part of a batch file, MOVE will replace the
file without prompting you. Specifying this switch overrides all
defaults and the current setting of the
COPY - Copy one or more files to another location.
ROBOCOPY /MOVE - Robust File and Folder Copy.
XCOPY - Copy files and folders.
MV - Copy in-use files.
Equivalent Linux BASH commands:
mv - Move or rename files or directories.
Suppose C:\LETTERS is a directory. To move the files ED.TXT and
SIGRID.TXT from the current directory to the LETTERS directory on
drive C, type:
MOVE ED.TXT,SIGRID.TXT C:\LETTERS
To move the BILL.TXT file from the current directory to the
LETTERS directory on drive C and rename it ANN.TXT, type:
MOVE BILL.TXT C:\LETTERS\ANN.TXT
To rename the THISYEAR directory on drive C to LASTYEAR, type:
MOVE C:\THISYEAR C:\LASTYEAR
- 0 No errors
- 1 Errors in moving one or more files
- Windows NT