如何通过批处理文件命令将文件从一个位置移动到另一个位置。 [英] How to move a file from one location to another through batch file commands.

查看:120
本文介绍了如何通过批处理文件命令将文件从一个位置移动到另一个位置。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在使用Windows 7中的批处理文件,尝试通过以下命令将文件从一个位置移动到另一个位置....但无法要做到这一点。



请帮帮我..



这是我的代码。



@echo off

暂停

move C:\ Users \ bapureddy.battu \Desktop \\ \\Bapu \Created docs \capOne.rtf D:\

@exit




提前致谢。

解决方案

您的文件路径包含空格,因此您需要将名称括在引号中:



 @ echo  off  
暂停
move C:\ Users \ bapureddy.battu \Desktop \Bapu \Created docs \capOne.rtf D:\
@exit





否则它会尝试移动名为C:\ Users \\的文件bapureddy.battu\Desktop\Bapu\Created,其不存在。


Hi all,

I am working with batch files in windows 7, trying to move file from one location to another through below commands.... but unable to do it.

Please help me..

This is my code.

@echo off
pause
move C:\Users\bapureddy.battu\Desktop\Bapu\Created docs\capOne.rtf D:\
@exit


Thanks in advance.

解决方案

Your file path contains spaces, so you need to enclose the name in quotes:

@echo off
pause
move "C:\Users\bapureddy.battu\Desktop\Bapu\Created docs\capOne.rtf" D:\
@exit



Otherwise it tries to move the file with the name "C:\Users\bapureddy.battu\Desktop\Bapu\Created" which does not exist.


这篇关于如何通过批处理文件命令将文件从一个位置移动到另一个位置。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆