windows hard link - protect against writes - windows

I have a bunch of files that I download at some point and then customize. I want to keep the originals, but also allow modifications, and I want to do this using hard links.
I figure I first download the batch of files into some sort of repository, then create hard links into my work location. I want to let the user delete his files (e.g. delete the hard link), which doesn't pose problems.
However I also want to let him write to them, in which case I want my original file to be left untouched in the repository, so I can revert later. How can I do this transparently, without actually locking the file and forcing him to delete it and recreate it?
Any ideas greatly appreciated, thanks.
Cosmin

In windows you have no such option as NTFS/FAT doesn't support snapshots. Hard links are just links anyway, both point to a single file and if link A is changed link B is changed also.
You can partially achive the same result with Windows File History however I don't know any way to set it up exaclty as you described.

Related

TF400889 Long path error received from TFS

Can someone please help me out with this? I tried using long path tool but they want me to pay in order to delete the folder. However I cant find the file the system is complaining about. I went to the folder
C:\Users\Casey\Desktop\Workspace\LegalHoldings\Sprints\Sprint5\Expunctions\LegalHoldings.Expunctions.Service.External\ServiceReferences\FillingReviewMDEService\LegalHoldings.Expunctions.Service.External.FilingReviewMDEService.GetFeesCalculationsResponse.datasource
This file:
FilingReviewMDEService.GetFeesCalculationsResponse.datasource
Does not exist in the folder?!?!?!
I don't know what to do, I have been reading a lot of work-arounds online however most people suggest using long path tool but I remember having this issue in the past but I cant remember how I solved. I believed it was something to do with the Developer Command prompt and resetting some paths.
All help would be greatly appreciated
In VS/TFS 2012, I found this helpful:
[Open TFS Explorer] -> [Right click the root folder] -> Advanced->'Remove Mapping...'
Then, you can change the path:
HTH
Usually these problems can be solved by shortening the paths higher up the tree.
It looks like your local path is the problem, so try mapping your code to a shorter root folder (e.g. C:\code rather than c:\users\Casey\desktop\workspace...)
Alternatively, you may be able to rename some mid level folders in your tfs structure to shorten the paths. But that's more extreme and probably not necessary in this case.
Not sure if you're even using the data binding features which the .datasource file is generated for, but turning that off in your service reference configuration by manually editing the .svcmap file would solve your problem.
After editing make sure you use the Update Reference feature to get rid of the unwanted file:
The second step would be to not map $/ to your user profile in your workspace mapping, but $LegalHoldings/Sprints/Sprint5/Expunctions to something like C:\Workspace\Sprint5 specifically that would drastically reduce the path depth required for your project.
If TFS still has a pending change for this file, you can use the tf utility from your workspace folder
C:\Users\Casey\Desktop\Workspace\LegalHoldings> tf undo $LegalHoldings/Sprints/Sprint5/Expunctions/LegalHoldings.Expunctions.Service.External/ServiceReferences/FillingReviewMDEService/LegalHoldings.Expunctions.Service.External.FilingReviewMDEService.GetFeesCalculationsResponse.datasource
to get rid of the pending change.

project.vim reports "is not a valid directory" when refreshing or creating a project

I'm using project.vim with VIm to manage large code bases with deep directory structures.
When I switch to another one or create (\C) a new one and do a refresh (\R) project.vim starts displaying messages through the whole process for different directories:
<dir_name> is not a valid directory. [O]K:
I have to press Enter all the time, although the directories exist. I took a look at the code and it checks if the path is a directory. They are.
Maybe there is a fix for this. The directories are under Perforce management, so everything is read-only.
I have to stay at the keyboard and keep pressing Enter for it to go to next directories... For large code bases this is takes a long time.
I contacted the author some time ago, but there was no response.
Did anyone encounter this before?
Could it be the it is bothered by the read-only-ness?
Is there a fix for this?
Thanks
The plugin uses glob() for some of those directory checks, which is affected by the 'wildignore' setting. Try
:set wildignore=
If that fixes the problem (and you have at least Vim version 7.2.51), you can modify the plugin's code to use glob(..., 1) instead.

Moved Xcode folder to new computer, now TONS of files are missing

You can only imagine how frustrated I am, trying to go through my old computer finding where all the resources are and putting them on the new one.
Please tell me how I can, next time, prevent this from happening. When I copy files into Xcode, I actually want to copy them in there. Not just use the file location.
When adding files to a project you'll get asked if Xcodeshould copy them. If you allow that, they are copied. otherwise consider using a version control system, that allows you to clone your project on another computer.

Finding modification date of a file recorded in a CD-R

I need to find out if a file recorded in a CD-R under Windows was modified after its first save. I couldn't find any inspector tools for such a purpose. So I was wondering if there is some kind of Windows API that may be used to extract this information. I found some related questions but answers were too low-level (assembly) and not covering multisession writes.
Thanks.
I don't think this is the place to ask that sort of question.
That said, the best option would be to Right Click > Properties > General Tab. There you should see Created date, Modified date, and Accessed Date. If you are looking for something further than that I'm not aware of any way to see a change log since it's a CD. Also because it is a CD (minus) R you shouldn't be able to write file changes to the cd for changes. That's only a CD (plus) R.
If the file was saved on your computer and you have a regularly scheduled backup, you might be able to find older versions of the file that you can restore to. This is found under the "Previous Versions" tab within Properties.
Hope this helps.

I created an xcode project with the same name and I accidentally overwrote the old project

I created an xcode project with the same name and I accidentally overwrote the old project. How do I get it back? All old source is gone and it isn't in the Trash. It has all been replaced with the new project template code.
If you have backups/source control, you can re-sync your old version.
Back up/shelve what you have now, and leave it checked out/on your system. Then, try to replace just the project file(s), leaving your source code and data in-place. Re-do the changes to your project(s), and you will have undone the damage.
If you don't have source control or backups, and you didn't delete your code/data, you may still be in luck. You'll have to re-create your project files from scratch, rather than your last save point, but you can simply import your existing code.
If you don't have any of those, and you deleted the source, then you are out of luck
No matter what, your next step is to get and use source control and/or start doing automatic backups of your code. Everyone makes mistakes like this, and this is why source control/backups exist. You must use them.
From the other discussion, it sounds like your best hope might be an OS X undelete utility, one example:
http://www.prosofteng.com/products/data_rescue.php
I hope you've not been doing much with the drive though as any file, email, or anything else you've saved to disk could have been overwriting what used to be there. But, it's better than doing nothing.
I would boot off a separate drive before you downloaded that to run it.

Resources