Gruntjs: How to move files from one folder to another - build

I'm using grunt as build tool. So how do you move files from one folder to another? Currently I use copy and clean. Is there any convenient way?

Related

Trouble creating custom folders in CodeBlocks

I am have a lot of trouble with CodeBlocks currently that is leaving me really frustrated. Basically, all I want to do is create my own folders within code blocks, and move my files into them.
Currently I am using default settings which forces file types into their own kind of virtual folder. I have a Sources folder with all of my .cpp files, and a Headers folder with all of my .h folders. All I want is a traditional layout.
For example, it is currently impossible for me to create a folder called Input which has both my input cpp and h files. While I looked online, I found an example where someone had this set up which has actual folders, where this is my current set up. Sources and Headers only exists in editor, and not in my actual folders. Do you have any idea how to fix this? I am trying to follow some tutorials that require the creation of folders : /
Thank you!

TFS Build 2015 - Using Globally Referred Files in Every Build

So, we are in this process of migrating XAML Builds to vNext (2015) Builds on TFS, and we are trying to "do things as clean as possible", since we had many, many customizations on the XAML builds that could be avoided and actually gave us problems along the way.
One major issue we are facing is with paths and "global files". Let me explain:
There are some files that, for commodity reasons, we have on a single place and every SLN file on that Collection refers them. Those files are such ones as Code Analysis RuleSets, Signing Files (SNK), etc. So the change is made in one place only and it affects every build.
Well, in XAML Builds we have a Build that runs with CI that downloads (Gets) those files, and since we hammered-in the same exact pathing for TFS and Machine (with a environment variable for the beginning of the path), the path is the same on the Developers and Build machines. However, this creates dependencies between builds and workspace issues.
My question here is, is there a configuration that I am missing that allows referring to files in other branches other than the build one? Since I’m trying to keep the build machines as “disposable” as possible, it’s running with an Agent Config Out of the Box: No custom paths, no hardwiring.
I already tried referring the files directly with their source control path, for example. The only options I’m seeing are either creating a PowerShell/CMD Script that downloads those files right into the same folder as the SLN or keeping it “as it is” and use relative paths putting a “Build” Build Step before the actual Build Step so it downloads the files to the server.
Isn’t there an “Elegant” way of doing this? Or is our methodology wrong from the get go?
You can add a Copy Files step to copy the files that the build needs:

Visual C++: automatic include refactoring when moving/renaming files

I just moved from CodeBlocks to Visual Studio 2013, and this is my first time using VS2013. My CodeBlocks project used virtual folders for structure, while keeping all the "physical" files in the same directory (I know, I know...) So I just spent an incredibly tedious 45 minutes replicating that structure with actual folders, creating folders and moving files around. The worst part was that, for each and every header file, I had to run a search-and-replace command like the following to update its path: #include "ObjectPtrArray.h" => #include "Structures/ObjectPtrArray.h"
This is a fairly large project (120+ source files), and I'm going to be doing much, much more refactoring over the coming days. A lot of that will include renaming classes, splitting them, creating new folders, moving files from folder to folder, and such. So is there any way I can automate this process? i.e. if I have a header file Tiles/SceneMap.h and I move it to Graphics/Tiles/SceneMap.h, can Visual Studio (or an extension for it) automatically update all of the includes that reference this file, without me having to run search-and-replace manually?
I do have ReSharper, but when I right click on a file the Refactor menu is blank. Is there another extension that I can use which would do this (preferably not conflicting with ReSharper?)
Thanks for your time!

How to copy Windows/System32 using C++

I have to build a copy tool project. I want to copy/clone the entire C: drive. I tried using SHFileOperation() and IFileOperation, but they allow me to copy files that are not system files only.
Can anyone suggest any API or method to complete the task?

How to organize an SVN repository for a C++ code

I am new to SVN and I want to commit a code to SVN using TortoiseSVN. I have C++ headers and source of the code, but I don't know how to organize the folders in an efficient way before uploading the version to SVN. Any suggestions about how people usually do? Is there any difference between the structure of codes for different languages, for example C++ or java. Should I follow any specific rules?
Update
So after checking the answers I made things a bit clearer. An usual folder structure is the following for one proyect:
/trunk
/branches
/tags
But I also found a similar structure that I liked a lot, which is:
/trunk #Keep it to developement mode always.
/samples #samples of use
/modules #software modules
/project_modName
/include # .hpp files
/src # .cpp files
/test #unitary tests
/branches #experimental developements (copies of trunk at various stages)
/tags #estable versions
/extras
/3rdparty #libs
/data #necessary data for developement
/doc #documentation
/resources #for window applications
At least I like it for multimedia applications code.
UPDATE 2
This update is just to explain how I am creating my repository. I created a folder called structure_svn. Inside I created the structure showned above. I right click on the parent folder and select import. In URL I write the folder path (file:///c:/svn_repos) so automatically the structure is created under svn_repos, without the folder structure_svn.
I want to remark this beacause the folder you right-click on to import will never appear. I just realized when I tried it, and also is explained on toturials.
The next step is to successfuly divide my code inside the created structure.
Here's how I structure my tree in a programming project (mainly from a C/C++ perspective):
/
src — Source and header files written by myself
ext — External dependencies; contains third-party libraries
libname-1.2.8
include — Headers
lib — Compiled lib files
Donwload.txt — Contains link to download the version used
ide — I store project files in here
vc10 — I arrange project files by IDE
bin — Compiled binaries go here
obj — The compiler's build files
gcc — If your project size justifies it, make a separate folder for each compiler's files
doc — Documentation of any kind
README
INSTALL
COPYING
makefile — Something to automate generation of IDE project files. I prefer CMake.
A few notes:
If I'm writing a library (and I'm using C/C++) I'm going to organize my source files first in two folders called "src/include" and "src/source" and then by module. If it's an application, then I'm going to organize them just by module (headers and sources will go in the same folder).
Files and directories that I listed above in italics I won't add to the code repository.
Edit: Note that I'm using Mercurial, not SVN, so the structure above it tailored for that version control system. Anyway, I see from your update that you already found one that you like.
One huge step forward is making sure all your projects do out-of-source builds, ie put temporary file in $TEMP and put all output file in a dedicated bin/lib directory. If done properly, this leaves you with source directories containing only source. What's in a name.. Apart from 'pure' source files also make sure that everything needed to build the source is in the repository: project files/generators, resources.
Once you got that in place correctly, there's a good chance you only have to put some typical project generated files (like *.suo for Visual Studio) into SVN's ignore list, and you're ready for commit.
Basically you can put in svn just what you want. The only standard you might consider to follow here is the standard repository layout: See here:
Within the project you are right that there exists several best practices. And they are different for each language. E.g a Java Package is organized by namespace. In the C++ world I have seen two main ways how to organize it:
Every Class into a header (.h) and a source file (.cpp) inside the same directory
Header and source is separated (so you have an folder especially for headers) This is usefull for libraries so that this path can be used by upper layer projects.
Then you need a folder for third party libs, another one for the target files and others such as build files or documentation.
You have a good explanation in the next Link if you are noob with svn!!