move

将一个或多个文件从一个目录移动到另一个目录。

Important

将加密文件移动到不支持加密文件系统(EFS)结果的卷将导致错误。 必须先解密文件,或将其移动到支持 EFS 的卷。

Syntax

move [{/y|-y}] [<source>] [<target>]

Parameters

Parameter Description
/y 停止提示确认要覆盖现有目标文件。 此参数可能在 COPYCMD 环境变量中预设。 You can override this preset by using the -y parameter. 默认是在覆盖文件之前提示,除非命令在批处理脚本中运行。
-y 开始提示确认是否要覆盖现有目标文件。
<source> 指定要移动的文件的路径和名称。 To move or rename a directory, the source should be the current directory path and name.
<target> 指定要将文件移动到的路径和名称。 To move or rename a directory, the target should be the desired directory path and name.
/? 在命令提示符下显示帮助。

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\