Move command to move one or more Files and Directory
Move command is functionality equivalent to copying a file or directory and erasing it from the current directory.
Syntax
Move Source Destination
Key
/y | Will not prompt you weather to overwrite an existing destination file. |
/-y | Prompts you to confirm to overwrite an existing destination file. |
Source | Specifies the path and name of the file or folder. |
Destination | Specifies the path and name to move files or folder. |
Note:
- Using the /y command-line option
The /y command-line option might be preset in the COPYCMD environment variable. You can override this with /-y on the command line. The default is to prompt on overwrite. - Moving encrypted files to a volume that does not support Encrypting File System (EFS) will give an error. Decrypt the files first or move the files to a volume that does support EFS.
Both Source and Target may be either a folder or a single file.
Example…
In the current folder
Move source_file.doc destination_file.doc
Move from a different folder/directory:
MOVE “C:\home\file1.doc” “D:\work\file2.doc” (Renamed file at destination)
MOVE “C:\home\file1.doc” “D:\work\file1.doc”
Specify the source only, with a wildcard will Move all the files into the current directory:
MOVE “C:\home\*.doc”