Home
> Commands A-M
> Commands M
MOVE
Description
| Syntax
| Parameters
| Switches
| Related
| Notes
| Examples
| Errorlevels
| Availability
Moves one or more files to the location you specify. The MOVE
command can also be used to rename directories.
Syntax
MOVE
/?
MOVE
[/Y]
| [/-Y]
[drive:][path]filename[,
[drive:][path]filename [...]]
destination
Parameters
- destination
(v6.0
Win95
NT3.1)
- 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.
- drive:
( path
filename
v6.0
Win95
NT3.1)
- Specifies the location and name of the file or files you want
to move. Also specifies the name of a directory you want to
rename.
Switches
- /?
(NTXP)
- Displays help.
- /-Y
(v6.2
Win95
NT2000)
- 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
%COPYCMD%
environment variable.
- /Y
(v6.2
Win95
NT2000)
- 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
%COPYCMD%
environment variable.
Related
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.
Notes
none.
Examples
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
Errorlevels
- 0 No errors
- 1 Errors in moving one or more files
Availability
- External
-
- DOS
-
v6.0
v6.10
v6.2
v6.21
v6.22
v6.23
v7.00
v7.0R1
v7.10
v8.00
- Windows
-
Win95
Win98
WinME
- Windows NT
-
NT3.1
NT3.5
NT3.51
NT4
NT2000
NTXP
NT2003
Last Updated: 2006/12/01
Direct corrections or suggestions to:
Rick Lively