入门命令11-移动文件(夹):move
2011-12-12 11:11
1006 查看
move的意思不解释了 它可以用来移动文件(夹)或者对移动文件(夹)时重命名.
用这个命令有几个注意点,来看几个例子.
1. 基本移动文件(夹),在win平台,但它不能跨驱动器移动文件夹.
2.重命名功能
3.其他注意
OK,此篇完结.
C:\DOCUME~1\DOUPI>move /? Moves files and renames files and directories. To move one or more files: MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination To rename a directory: MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2 [drive:][path]filename1 Specifies the location and name of the file or files you want to move. destination Specifies the new location of the file. Destination can consist of a drive letter and colon, a directory name, or a combination. If you are moving only one file, you can also include a filename if you want to rename the file when you move it. [drive:][path]dirname1 Specifies the directory you want to rename. dirname2 Specifies the new name of the directory.
用这个命令有几个注意点,来看几个例子.
1. 基本移动文件(夹),在win平台,但它不能跨驱动器移动文件夹.
E:\>md aa bb\bbb cc E:\>copy con aa\test1.txt this is test11111^Z 已复制 1 个文件。 rem 移动文件到文件夹 E:\>move aa\test1.txt cc\ rem 移动一个文件夹到另一文件夹,带了\,,,移动失败!?? E:\>move bb\ cc\ 系统找不到指定的文件。 rem 再来一次,成功 E:\>move bb cc\ rem 跨驱动器移动文件,成功. E:\>move cc\test1.txt d:\ E:\>dir d:\test1.txt 驱动器 D 中的卷是 SOFT 卷的序列号是 6C97-9E44 d:\ 的目录 2011-12-12 10:49 17 test1.txt 1 个文件 17 字节 0 个目录 133,784,256,512 可用字节 rem 跨驱动器移动文件夹,失败 E:\>move cc\bb d:\ 拒绝访问。
2.重命名功能
rem 移动文件时进行重命名 E:\>move d:\test1.txt e:\cc\test2.txt rem 如果第二参数为已存在的文件夹,则是移动操作 E:\>move aa cc E:\>cd cc E:\cc>dir 驱动器 E 中的卷是 TEST 卷的序列号是 EC10-1C79 E:\cc 的目录 2011-12-12 10:59 <DIR> . 2011-12-12 10:59 <DIR> .. 2011-12-12 10:50 <DIR> aa 2011-12-12 10:49 <DIR> bb 2011-12-12 10:49 17 test2.txt 1 个文件 17 字节 4 个目录 131,208,916,992 可用字节 rem 当第二参数为不存在的文件夹,刚是重命名文件夹操作 E:\cc>move bb cc 移动了 1 个文件。
3.其他注意
E:\cc>copy test2.txt aa\ 已复制 1 个文件。 rem 移动文件时覆盖会自动提示 E:\cc>move test2.txt aa\ 改写 E:\cc\aa\test2.txt 吗? (Yes/No/All): y E:\cc>copy aa\test2.txt . 已复制 1 个文件。 rem /y参数即可去掉覆盖提示,这个与其他命令是一样的. cmd中默认为-y,bat中默认为y,这点要注意 E:\cc>move /y aa\test2.txt . rem 对具有隐藏属性的文件(夹)无法操作 E:\cc>attrib +h test2.txt E:\cc>move test2.txt test1.txt 系统找不到指定的文件。
OK,此篇完结.
相关文章推荐
- 一天一篇批处理之——Part3:复制/移动文件命令move,copy,xcopy
- Linux 入门常用命令 — 文件的复制、删除和移动
- 11_Linux基础知识及命令――――复制和移动文本文件
- 【DOS命令】之 move 文件移动
- 【翻译自mos文章】 使用asmcmd cp命令 把datafile从文件系统移动(move)到asm磁盘组中--针对11gR2
- 使用asmcmdcp命令把datafile从文件系统移动(move)到asm磁盘组中 针对11gR2
- Linux 入门常用命令 — 文件的复制、删除和移动
- Linux 入门常用命令-2.Linux文件的复制、删除和移动命令
- 使用asmcmdcp命令把datafile从文件系统移动(move)到asm磁盘组中 针对11gR2
- Linux 入门常用命令 — 文件的复制、删除和移动
- Linux 入门常用命令-2.Linux文件的复制、删除和移动命令
- LINUX入门常用命令之文件内容查看
- Linux 入门常用命令-11.Linux磁盘管理
- LinuxStudyNote(11)-Linux常用命令(2)-目录文件复制命令(6)cp
- 移动文件命令
- linux学习笔记(三) 复制、删除、移动、重命名文件(文件夹)命令
- 开始玩hadoop 11 --Hbase 入门 shell基础命令
- Linux入门之常用命令(11)复制cp及scp
- Linux文件的复制、删除和移动命令
- Linux文件的复制、删除和移动命令