Realtime File Sync solution for windows? - windows

When I develop web applications I'm frequently need to sync files from a working folder to external server or another folder. I like keeping my code separated from the web sever.
In open source world there is the eclipse with file sync that does the job pretty well. Unfortunately I can't find any good replacement for Visual Studio.
I've only found two generic solutions:
- Winscp which is pretty good but stucks when a file is locked and ask for confirmation. Which is quite annoying.
- DSynchronize which works pretty well (ie. doesn't ask questions) but doesn't have filters so I can't tell it not to sync my .svn files or web.conf :(.
Do you know any good way to achieve realtime synchronization in Visual Studio or windows?
I doens't have to have gui in fact I would love to see a command line solution like a powershell command that outputs modified files.

I've ended up using Mercurial (to skip the .svn files) and DSynchronize to sync files

I would give a try to immortal classic - rsync. There is cygwin enabled implementation for Windows called cwrsync: http://www.itefix.no/i2/node/10650 . With proper configuration (potentially with some fine tuning with scripting as well) it will do perfectly.
If you would like to have bi directional synchronization, the Unison may be the answer:
http://www.cis.upenn.edu/~bcpierce/unison/
If you are looking for something even fancier, you might give a try to one of distributed file systems available, like CODA (I'm afraid decent Windows systems aren't supported yet): http://www.coda.cs.cmu.edu or native DFS solution from Microsoft, however I'm afraid the set up is too hassling (if not impossible in your case) since it's targeted for enterprise solutions:
http://technet.microsoft.com/en-us/library/cc753479(WS.10).aspx
Of course DFS option probably won't support filtering you are interested in.

Related

Finding PowerShell Cmdlets equivalent to GUI actions

I would like to know where I could find good resources/documentation on configuring a new Windows10 installation using Powershell scripts. I know bash but I'm completely new to Powershell.
When I search google, all I can find about automatically configuring Windows relates to Windows Deployment Services. But I don't have and don't want a Windows Server and simply running a few scripts after each installation is sufficient for me.
I found a few scripts that solve some of the things I want to do:
https://github.com/FlatlanderWoman/winCleaner
https://github.com/hahndorf/Set-Privacy
But for everything else, when I look into the TechNet Library I find it very hard to find anything useful. And when I do find something, it looks outdated:
https://technet.microsoft.com/en-us/library/hh852115.aspx
The problem is: I known the GUI-way of configuring everything I want, but I don't know how to find the corresponding commandlets to do the same with Powershell.
Is there some kind of event listener I could use to find the Cmdlets? Or does anyone have some resources/documentation to recommend? Is the TechNet Library really the established way to find these commands?
Thank you.
Unfortunately PowerShell was only really implemented in Windows 7 (yes I know it was available for XP but not preinstalled) and even then it was kind of like an addon rather than part of the core OS. Windows 8 and 10 have further improved functionality but still for the most part do not use it for their own settings and functions as most home users would have no use for it.
However there is nearly always a way to do whatever you need to, I have a script that configures servers from scratch, renaming the server, installing requisite software and features, copying files, configuring VSS, right down to putting the Computer icon on the desktop. You just have to make a list of everything you want to do, then Google each one.
For example: https://www.google.co.uk/search?q=powershell+put+computer+on+desktop - at time of writing the first result is a TechNet script pointing at a registry key. Tidy as necessary, whack into your build script and move on to the next item.
As of yet there's nothing I've found I've been unable to do with PowerShell, but the vast majority of it has not been directly with cmdlets. There's a lot of registry tweaking and command line stuff like msiexec or schtasks, some COM objects and an awkward Type I had to create and use to set the DNS suffix.
Overall I think it's still easier to do all this in PowerShell than any other scripting language and it's more flexible than premade tools, not because it has so much functionality built-in but because it can access .NET and COM which gives you broad access to all the half-baked stuff MS have wedged in over the years.

How to rollback code visual basic

I created a program in visual basic and I published a few different versions of it and my current code isn't working and I want to rollback to my previous version.
I have no ad-dons or extensions or plugins.
Unfortunately, you cannot do it easily. You could "decompile" your working assembly and try to find what's changed in relevant sections, but keep in mind that such programs' output does not contain comments or syntactic constructs so it will be hard to read. I'm afraid that's the best you can do at this point. I had good experience with dotPeek, but there are many such tools.
As for what is most important for you to start doing as soon as possible, look into version control systems. There is no better time to start than now. I recommend starting with git as it is popular, very powerful, lightweight and has tools and documentation to help you get into it. Also, you do not need to set up any servers, you can keep it all on you local computer, but it could be beneficial to host your code on one of open hosting sites, like github.

How to bind several exe and run them separately?

Do not let topic to mix you up. My issue is a bit different from what asked frequently.
I have 6 command line tools and I want to pack them as 1 exe (or whatever) file.
Different part is, this not a malware to hide something behind other. They shouldn't run in same time. And I need to pass them command line parameters also.
What I already can do is to pack them (archive) and extract them to "filesystem" regarding to need. But this is also not what I look for. Trying to find something like unpacking directly to RAM etc. Or same logic as UPX like tools. And not to forget. Those exe's are not .Net stuff. I already found people asking about that but no also.
I think my demand is something with pain but. Hope to find someone experienced out of here.
You could unpack them into TEMP directory and remove when all things are finished. Very often this is a suitable approach.
Another way is to use commercial solutions like BoxedApp.
Anyway, Windows itself doesn't have a way to launch an exe (I suppose that mentioned command line tools are executable files, not batch files) from a memory. It is always a "hack" to emulate running a process from memory.

File changed watcher Tool

I have recently begun a new project which runs on remote computer. I usually remote debug the application. I have setup microsoft sync toy to "echo" the built exe,dll,pdb and configs to the remote computer.
However, i cant add synctoy to my visual studio build events because it might disturb some of the other programmers in my team. I was wondering, which (free) tool would you guys use to watch a folder of files and kick off synctoy when a change is detected.
I can write a simple file watcher, but rather than reinvent the wheel, i would rather just use an existing tool. Searching on google yields so many tools, i wouldn't want to try them out just to find a good one.
It may fall under the banner of reinventing the wheel, but if you are using .NET, the FileSystemWatcher class, albeit without a UI, is pretty much as comprehensive as you can get, out of the box.
I'm sure you could knock something up with it in a very short time.
What about using Robocopy with the /MON or /MOT options? See http://ss64.com/nt/robocopy.html for more details.

Which DVCS would work best on Windows for my scenario?

At work I use ClearCase and SourceSafe, but have found some time to do some time to code for myself enroute thanks to a disposable laptop.
However, I wish I had a lightweight VCS on my system using which I would be able to make changes to my code during the commute and then push/grab them from my Linux systems.
I use git on my home system, but I can't really get it working on Windows. I don't want all that cygwin hack.
If it does not run natively on Windows, it just won't do.
What have you guys tried on your Windows system? Something that YOU use.
The big player at the moment seems to be Mercurial?
What would be best for a one (or maybe two) man team?
I just need to maintain :
Versioned copies of source code.
Checking in and out should be as less obtrusive as possible.
I am looking forward to a multiple Undo kind of feature (like that in an EMacs buffer) but persistent.
I really like the way git keeps track of lines moving between files in a source code set
I should be able to move part(s)/sub tree(s) of the source tree (each sub tree implies a module/plugin to my the main software I am building) to an archival system either completly or partially and restore them back from the archive as and when required and the system should track any changes to this tree as well.
I actually want to experiment with my code as much as possible without me manually keeping track of what I modified and what I need to undo once I try out some idea, so that I am back to where I want to continue from.
Notes : A similar topic came up a year ago : DVCS Choices - What's good for Windows?
I hope things have changed, and I really want people to share their own, real life experiences. Not something they recommend without using it or they think will work.
Bazaar and Mercurial both work very well on Windows. I posted in the question you linked, and since then, both have improved their Windows support even more. Using them is easy and flawless, and they even have GUIs if you swing that way.
I for one have switched from bazaar to git, and I've been pleased.
If you've a Clearcase background, why don't you take a look at Plastic SCM? Check this link, it will show you how it works on a distributed setup (and of course all the basic operations) http://codicesoftware.blogspot.com/2010/03/distributed-development-for-windows.html.
You won't miss any of the "good" clearcase features but all the shortcomings are simply gone (faster, installs on 45seconds, no cumbersome setup to use on a mixed Win/Linux scenario, built-in ACLs, excellent branching and merging, much better common ancestor algorithm, visualizations, better GUI, and you still have "selectors" in case you miss config_specs, but not being mandatory)

Resources