-
Notifications
You must be signed in to change notification settings - Fork 0
MOVE command
Moves a file from one location to another.
move <SRC> <TARGET> [options]-
<SRC>
The source file(s) to move. Can specify multiple files. Each file must be separated by a pipe character (|). -
<TARGET>
The target location(s) to move to. Can specify multiple files only if the/Moption is specified. Each file must be separated by a pipe character (|).
Note
The annotations 🪟 and 🐧 indicate that an option is only available on either Windows or Linux, respectively.
-
/U(--preserve-undo,-u) 🪟
Preserve undo information, if possible. -
/O(-o,--files-only) 🪟
Perform the operation only on files (not on folders) if a wildcard file name (*) is specified. -
/M(--multi-dest,-m)
TheTARGETargument specifies multiple destination files (one for each source file inSRC) rather than one directory where all source files are to be deposited. The target files must be separated by a pipe character (|). -
/C(--no-connections,-c) 🪟
Do not move connected files as a group. Only move the specified files. See the Remarks section for more info. -
/S(--no-copy-security,-s) 🪟
Do not copy the security attributes of the file. The destination file receives the security attributes of its new folder. -
/R(--recursive,-r) 🪟
Recursively operate into subdirectories. -
/E(--rename-on-collision,-e) 🪟
Give the file being operated on a new name in a move operation if a file with the target name already exists at the destination. -
-v(--overwrite,/V) 🐧
Overwrite the file if it already exists at the destination. -
/?(/h,-h,--help)
Show help and usage information.
mv, mov
The move command moves one or more files or directories to a target location.
To move multiple files or directories, specify the /M flag and separate the files or directories with a pipe (|) character.
Note
The section below applies only to Windows.
Prior to Windows Vista, operations could be undone only from the same process that performed the original operation.
In Windows Vista and later systems, the scope of the undo is a user session. Any process running in the user session can undo another operation. The undo state is held in the Explorer.exe process, and as long as that process is running, it can coordinate the undo functions.
If the source file parameter does not contain fully qualified path and file names, the /U option is ignored.
The /S option causes the command to not copy the ACL (Access Control List) of the original file. Instead, the destination file(s) receive the ACL of the destination folder.
Since Windows 2000, a HTML file can be connected to its associated files, and the files will be copied together (unless the /C option is specified).
To create a group of connected files, the primary document must have an .htm or .html file name extension. Create a subfolder of the primary document's parent folder. The subfolder's name must be the name of the primary document, minus the .htm or .html extension, followed by one of the extensions listed below. The most commonly used extensions are .files or _files. For instance, if the primary document is named MyDoc.htm, naming the subfolder MyDoc_files defines the subfolder as the container for the document's connected files. If the primary document is moved or copied, the subfolder and its files are moved or copied as well.
For some languages, it is possible to use a localized equivalent of _files to create a subfolder for connected files. The following table lists the valid strings that can be appended to a document name to create a connected files subfolder. Note that some of these strings have - as their first character rather than _ or ..
_archivos |
_arquivos |
_bestanden |
_bylos |
-Dateien |
_datoteke |
_dosyalar |
_elemei |
_failid |
_fails |
_fajlovi |
_ficheiros |
_fichiers |
-filer |
.files |
_files |
_file |
_fitxers |
_pliki |
_soubory |
_tiedostot |
For more information, see Connected Files.