复制一个批处理文件到另一个位置 [英] Copying a batch file to another location
问题描述
我想一个批处理文件复制到另一个位置,我看着在cmd中的复制命令,并试图用的Xcopy和复制,但我不知道如何使用它们,这是我得到了什么至今
I'm trying to copy a batch file into another location, I've looked into the copy commands in cmd and tried to use " Xcopy" and "Copy" but I wasn't sure how to use them, this is what i got to so far
copy test.bat C:\Users\LENOVO\Desktop\Hello test.bat
我的问题是与源和遇到麻烦destination..I'm试图了解copy命令的格式
My problem is with the source and destination..I'm having trouble trying to understand the format of the copy command
编辑:
(1)我是从命令提示符窗口运行的test.bat我的文件
(1) I'm running my test.bat file from the command prompt windows
(2)test.bat的是以下内容:C:\\用户\\联想\\桌面\\粗体
(2) The test.bat is in the following: C:\Users\LENOVO\Desktop\Bold
推荐答案
如果你好是目标目录的名称,然后执行:
If "Hello" is the name of the destination directory, then do:
copy test.bat C:\Users\LENOVO\Desktop\Hello\test.bat
如果的test.bat你好的目标文件名,然后把引号围绕它来处理包含空格的文件名:
If "Hello test.bat" is the name of the destination file, then put quotes around it to handle the filename containing a space:
copy test.bat "C:\Users\LENOVO\Desktop\Hello test.bat"
这两个假设您的命令提示符的当前目录是源test.bat的所在。如果没有,你可以指定在源和放大器的完整路径;目的:
These both assume that your command prompt's current directory is where the source "test.bat" resides. If not, you can specify the full path for both the source & destination:
copy C:\Users\LENOVO\Desktop\Bold\test.bat C:\Users\LENOVO\Desktop\Hello\test.bat
这篇关于复制一个批处理文件到另一个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!