如何将源文件移动到不同的目录? [英] How do I move source files to different directory?

查看:89
本文介绍了如何将源文件移动到不同的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试清理一个应用程序并具有以下内容:



 [CApp.cpp,CApp.h等] 

- >子目录#1
- >子目录#2 [.cpp,.h等]

- >子目录新





应用程序是使用类向导在VS12中创建的;不知何故,源文件和头文件在子目录#2中出现。我想在与子目录#1相同的树级别创建一个子目录NEW,并移动子目录2中的一些文件 - >子目录NEW。



虽然我从未尝试过,但我想我可以导出和导入文件。还有另外一种方法吗?项目中的一些文件跟踪文件的路径,一旦创建了NEW子目录,我就可以轻松编辑该文件并包含我想要的文件。



谢谢,



Barry

解决方案

< blockquote>这是一件很容易自己调查的小事。以下是我要做的事情:



我会将项目文件作为文本文件打开(在Visual Studio外部使用文本编辑器,或者卸载项目),例如* .vcproj,* .csproj,观察项目文件的规定位置并修改路径。请记住,所有路径都是相对于项目文件的目录编写的。



-SA


I am attempting to clean up an application and have the following:

[CApp.cpp, CApp.h, etc.]

  --> Subdirectory #1
           -->Subdirectory #2 [.cpp, .h, etc.] 

  -->Subdirectory NEW 



The app was created in VS12 using the class wizards; somehow the source and header files wound up in Subdirectory #2. I want to create a subdirectory NEW at the same tree level as Subdirectory #1 and move some of the files in Subdirectory 2 -> Subdirectory NEW.

Although I have never tried it, I guess that I could export and import the files. Is there another way? Some file in the project that keeps track of the file's path that I could easily edit once the NEW subdirectory is created and contains the files that I want there.

Thanks,

Barry

解决方案

This is a trivial thing you could easily investigate by yourself. Here is what I would do:

I would open a the project file as a text file (with a text editor outside Visual Studio, or having the project unloaded), such as *.vcproj, *.csproj, observe where the project files are prescribed and modified the paths. Remember that all paths are written relative to the directory of a project file.

—SA


这篇关于如何将源文件移动到不同的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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