Renaming folder without breaking solution - solution

How can I rename a folder without breaking the solution?

I got it, you just open the solution with notepad++ and rename the folder there, and then you rename the folder outside of the solution. Then check if it doesn't break, otherwise you might've mistyped

Related

vscode: changing a file modifies it in temp folder, I cannot make changes to files outside of the temp folder

I have a file built by somebody else. I am trying to append lines to the end of it.
When I do this and hit save, everything seems to work. But the only change has been in the temp folder, which seems to be a copy of my real folder. No changes occur to the actual file. This means that I cannot do development in vscode, since I cannot actually modify files.
How can I fix this?

How can I remove deleted files from emacs-projectile's cache if `projectile-invalidate-cache` doesn't do the trick?

Pretty much what the title says. For whatever reason projectile-invalidate-cache does not remove dead files from projectile's cache, or at least not from the results it presents me. I am using Spacemacs, an extension of Emacs, but I believe this issue is specific to projectile.
Restarting the editor does not fix the issue.
One thing to try would be to make sure you are running projectile-invalidate-cache from the project you want to clear out files for (i.e., from a buffer that is visiting a file in that project. From the docs for projectile-invalidate-cache:
Remove the current project's files from `projectile-projects-cache'.
Note it is supposed to work only for the "current project".
However, I have also not had much luck with this command (potentially this is me not using the command correctly). What I often end up doing is deleting the actual cache file (in my case this is ~/.emacs.d/projectile.cache. I have not noticed any negative effects of this, and your cache will be rebuilt without the deleted files next time you use projectile.
If your project is a git project, try to commit your change. It works for me.
Actually the correct path of projectile.cache file to be removed is: ~/.emacs.d/.cache/projectile.cache
I installed through MELPA, and deleting ~/.emacs.d/projectile-bookmarks.eld did the trick for me.

Robocopy a specific folder

We use a folder template for our projects we work on and my normal process to log each job is to right click, copy, rename, make shortcuts, etc... It's like a 5 minute process after everything is said and done. For right now the idea is to just copy that template folder, rename, make shortcuts, and send those shortcuts to the appropriate directories. This issue I'm having is that when I run robocopy it is copying the contents and not the template directory itself. A snippet of what I have right now is:
robocopy \\Users\blah\blah\DirectoryIWantToCopy \\Users\blah\blah\CopiedDirectory /e
As of right now when I run it, it is copying everything inside the directory instead of just copying the parent directory. I understand why it's doing it, but it seems as though the only way to accomplish what I'm doing is to exclude all the directories inside \Users\blah\blah\ that I don't want it to copy. Is there not a switch to add that just says copy this specific directory and all sub directories of this specific directory? I'm sure that is as simple as it sounds, and I'm sure I'm overlooking it, but from all the other questions I've googled I haven't been able to find an answer that answers this.
So when I read the information about the switches on Technet it kept referencing a file, and thought that only meant an actual file and not a directory. I got it to work by simply adding the file name after the destination. Thanks.

Correct way to copy Swift project without altering old project?

I was wondering if there was a correct way to make a copy of a Swift project?
I realised that when I want to make a copy of a project (so that I can have a backup working copy when I continue with my project and I make a mistake) and I use that copy; the copy alters the build folder of my original file. Not only that but if I re-name classes or change IBLabels/IBOutlets, and although the change isn't reflected in the original code; when I compile the original file there will an error associated to an undefined class or the xib file would be changed which would also throw an error. At the start the original file compiled, but after working on the copy of the original file and running into an error. The original file also wouldn't compile, any ideas on why this happens? And how to fix it?
Though #Daij-Djan's answer is correct you need to watch for added files with relative paths. So what I do for a backup is to use git. That works better than any backup.
If you really want a copy, just copy the folder with the project with CMD-D which creates a <folder> Copy (or whatever is your localization). You can rename the copy, but leave the contents untouched. Also do leave it in the same folder as the original one to avoid conflicts with relative paths.
Just copy the whole folder from a to b!
IF you used absolute paths in your xcode project though .. bad for you :/ your project references the original files no matter what
what you can try is fixing the project.pbxproj xml file manually. this is doable but not supported by xcode really :/
IMHO if a copy isn't enough because you messed up the project with absolute paths, readd all files MANUALLY and make sure all is relative to the project location
Just zip your current project & extract it inside your new project folder & enjoy....

Back and Rollback Script for a File Transfer

I looking for a good solution to backup and rollback a folder using the Windows(XP/Vista/7) OS.
As an example, say, I have a folder, called "\SOMEOTHERPC\Destination" (that contains files and subfolders). I wish to take a back up of this folder to my local disk. Then, say I was to edit or delete some of the content of this "\SOMEOTHERPC\Destination" folder and the afterwards rollback the folder to its previous state.
What's the best way to go about this. I am thinking of writing a PowerShell script? Perhaps there is a better way. Any suggestions appreciated?
Thanks.
RoboCopy seems to do the trick requiring just a couple of lines of script.