• xcopy的一次误用及解决办法


    作者:朱金灿

    来源:http://blog.csdn.net/clever101

     

             一直迷信xcopy的强大功能,在复制文件的地方都用xcopy。今天在VS2008上设置一个生成后事件使用了xcopy命令:

    xcopy /Y $(SDK_DLL)\$(ConfigurationName)\$(ProjectName)D.dll  $(SDK_BIN)\$(ConfigurationName)

            结果在执行这一命令时出错,提示:

    1>正在执行生成后事件...

    1>Does E:\2012\src\outdir\Debug specify a file name

    1>or directory name on the target

    1>(F = file, D = directory)? 

    1>Does E:\2012\src\outdir\Debug specify a file name

    1>or directory name on the target

    1>(F = file, D = directory)? Project : error PRJ0019: 某个工具从以下位置返回了错误代码: "正在执行生成后事件..."

              然后上网查资料,搜到了stackoverflow上的一个相关帖子:

    xcopyfile, rename, suppress “Does xxx specify a file name…” message

           一个大侠这样回答(最佳答案):

            xcopy isgenerally used when performing recursive copies of multiple files/folders, orwhen you need the verification/prompting features it offers. For single filecopies, the copy command works just fine.

           看来此处使用xcopy是杀鸡用牛刀了,果断改为:

    copy  $(SDK_DLL)\$(ConfigurationName)\$(ProjectName)D.dll  $(SDK_BIN)\$(ConfigurationName)

            

                执行该命令就啥错误都没有了。






  • 相关阅读:
    就业指导【黄春霞】
    百度面试题
    面试题08-多线程网络
    面试题07-内存管理
    面试题06-Foundation
    面试题05-UI控件
    面试题04-应用程序
    面试题03-第三方框架
    面试题02-客户端安全性和框架设计
    面试题01-数据存储
  • 原文地址:https://www.cnblogs.com/lanzhi/p/6470602.html
Copyright © 2020-2023  润新知