|
Action |
Moves or renames files and directories.
|
Syntax |
MOVE "source" "destination" [/h] [/s]
If the source or destination specifies a directory, please make sure to add a trailing backslash. If the destination exists, the source will be moved below the destination. If the destination does not exist, the source will be renamed.
|
/c |
Continue operation, even if errors occur. |
|
/h |
Moves/renames hidden and system files also. |
|
/r |
Overwrite read-only files. |
|
/s |
Renames specified files in all subdirectories. |
|
Remarks |
Wildcards are supported.
MOVE overwrites existing files without warning.
|
Examples |
; If NewDir does
not exist, this command will RENAME MyDir to NewDir:
MOVE "S:\MyDir\"
"S:\NewDir\"
; If NewDir does exist,
this command will MOVE MyDir below NewDir:
MOVE "S:\MyDir\"
"S:\NewDir\"
; This command will change the extension of
all files matching the
; wildcard
specification to '.bak'
MOVE "MyDir\file*.txt"
"MyDir\file*.bak"