预构建事件:复制文件夹和它的子文件夹和文件到使用的XCopy build目录 [英] Pre Build Event: Copy Folder and it's SubFolders and files into Build Directory using XCopy

查看:275
本文介绍了预构建事件:复制文件夹和它的子文件夹和文件到使用的XCopy build目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有窗口应用程序,我有一些插件及功放;这是我摆在我的应用程序文件夹结构ChildPlugins(请参阅文件夹结构图)。我用SVN源控制,因此,每一个文件夹中有的.svn 文件夹中。

I have Window Application and I have some plugins & it's ChildPlugins which I placed in My Application folder structure(see folder structure image). I used SVN as source control so, every folder has .SVN folder.

下面是我的问题:

下面图片是我的插件目录结构。所有文件夹中有一些文件有关它的插件。现在,我想所有的文件夹(子文件夹)及复印件;它通过使用预建事件的文件,我的应用程序生成的输出路径。

Below image is my directory structure for Plugins. All folder have some files related it plugins. Now I want to copy all folder (with SubFolders) & it's files to my Application Build output path by using Pre Built Event.

净我发现使用的XCopy我能达到我想要的搜索后。通过使用下面的代码我可以复制Plugins目录和放大器;它的文件,但不能能够复制它的子文件夹和放大器;子文件夹中的文件。

After searching on net I found that by using XCopy I can achieve what I want. By using below code I can copy Plugins directory & it's files but can't able to copy it's sub folders & Sub folder Files .

xcopy "$(SolutionDir)Plugins\*.*" "$(SolutionDir)Windows\Host\Host.GUI\bin\x86\$(ConfigurationName)\Plugins\" /Y/D

我要复制的文件夹和放大器;它与所有文件中的所有子文件夹和要排除的.svn 。任何人都可以点我,我该怎么做?

I want to copy Folder & it's all subfolders with all files and want to exclude .SVN. Can anyone point me How can I do this?

感谢。

推荐答案

您需要添加/ E开关复制子目录。

You need to add the /E switch to copy subdirectories.

这篇关于预构建事件:复制文件夹和它的子文件夹和文件到使用的XCopy build目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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