Share via


Move

Moves one or more files from one directory to the specified directory.

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.

/?   : Displays help at the command prompt.

Remarks

  • 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 overwrites unless the copy command is being executed from within a batch script.

  • Moving encrypted files

    Moving encrypted files to a volume that does not support Encrypting File System (EFS) results in an error. Decrypt the files first or move the files to a volume that does support EFS.

Examples

To move all files with the .xls extension from the \Data directory to the \Second_Q\Reports directory, type the following:

move \data\*.xls \second_q\reports\

Formatting legend

Format

Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Copy

Move

Command-line reference A-Z