Share via


Move

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

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:

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

See Also

Concepts

Copy
Move
Command-line reference A-Z
Command shell overview