|
MOVE
Moves files from one location to another, as opposed to
copying. The MOVE command combines COPY and DELETE by
copying a file then deleting the original.
Syntax
move [{/y|/-y}] [Source] [target]
Parameters
/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.
Source : Specifies the path and name of the file or files
to move. If you want to move or rename a
directory, Source should be the current directory
path and name.
target : Specifies the path and name to move files to. If
you want to move or rename a directory, target
should be the desired directory path and name.
Examples
MOVE C:\test.txt A:\test.txt, moves the file "test.txt" from
C:\ to the A: drive.
To move all files with the .xls extension from the \Data
directory to the \Reports directory, type the following:
MOVE \data\*.xls \reports\
You may also use MOVE to rename files in the new location.
Example: MOVE C:\test.txt C:\windows\myfile.txt creates a
copy with a new name and deletes the original. Copies and
deletes a file at the same time.
Batch File Commands
|