MOVE
suggest changeMoves files or directories between directories, or renames them. See also REN.
Examples:
move File1.txt File2.txt
Renames
File1.txt
toFile2.txt
, overwritingFile2.txt
if confirmed by the user or if run from a batch script.move File.txt Dir
Moves
File.txt
file intoDir
directory, assumingFile.txt
is a file andDir
is a directory; overwrites target fileDir\File.txt
if conditions for overwriting are met.move Dir1 Dir2
Renames directory
Dir1
toDir2
, assumingDir1
is a directory andDir2
does not exist.move Dir1 Dir2
Moves directory
Dir1
intoDir2
, resulting in existence ofDir2\Dir1
, assuming bothDir1
andDir2
are existing directories.move F:\File.txt
Moves the file to the current directory.
move F:\*.txt
Moves the files located at
F:\
and ending in.txt
into the current directory, assuming the current directory is notF:\
.
Links:
$ move /?
Moves files and renames files and directories.
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
To rename a directory:
MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2
[drive:][path]filename1 Specifies the location and name of the file
or files you want to move.
destination Specifies the new location of the file. 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 include a filename if
you want to rename the file when you move it.
[drive:][path]dirname1 Specifies the directory you want to rename.
dirname2 Specifies the new name of the directory.
/Y Suppresses prompting to confirm you want to
overwrite an existing destination file.
/-Y Causes prompting to confirm you want to overwrite
an existing destination file.
The switch /Y may be present in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless MOVE command is being executed from
within a batch script.