File Synchronization Utility

by Dmitry Kirsanov 26. September 2011 10:31

Yet another command line utility written to do some useful stuff in the background. This time it is about file synchronization.

It’s quite often that we need to make 2 directories in our local network in sync. For example, you may want to synchronize folders with photos, backup files or even production files of your web application between IIS web farm nodes.

This program utilizes the Microsoft Synchronization Framework, so basically it does very little apart from what Microsoft already provides. Personally, I am using it to pull backups from TFS server on daily basis and to synchronize shared folders among load balancing cluster of production web server. In  both cases utility is running as Task Scheduler task and everything happens in background.

It doesn’t require installation, just unpack it to your utilities folder and it’s ready to go. It requires .NET framework 4 Client Profile in order to run. Another dependency is Microsoft Sync Framework 2.1 (Two components required - Synchronization and Provider Services).

FileSync.rar (114.45 kb)

 

Installation file, which will also install the prerequisites, such as .NET Framework 4.0 Client Profile:

FileSyncSetup.exe (4.42 mb)

Windows 8 Developer Preview revealed

by Dmitry Kirsanov 14. September 2011 15:00

This night MIcrosoft opened the prototype of their brand new OS and this build was named “Developer Preview”. Aimed mainly at software developers, it has a copy of not yet released Visual Studio 11, using which you can create software for that same Windows 8.

The only downside of this release is that you couldn’t install it on either VMWare workstation or Windows Virtual PC – it could only be installed on either physical or Hyper-V machine. I installed it on both.

First fascinating things about new OS is drastic change in user experience. I don’t even mean the new Metro and effects, but also much reworked file copying routine and Task Manager. The latter became as useful as it never been.

Although scheduled release date is not yet revealed, and most likely will be somewhere in Autumn of 2012, chances are you can grab a copy of ISOs at MSDN.

Windows Live is alive

by Dmitry Kirsanov 11. September 2011 19:10

Do you remember such thing as Outlook Express? A lightweight e-mail client from Microsoft which was the part of operating system since the stone age. It was separated from Windows for good, so unlike in Windows XP, we don’t have to cut it from the distribution DVD anymore. However, once separating some applications from the system, Microsoft added a few more tools to the Live family.

One of them is the one I am using at this particular moment – Windows Live Writer. The thing looks like a Microsoft Office 2010 product, something similar to FrontPage, but it’s about blogging. Whatever platform you are using for your blog, it can connect to it and you can use this wonderful editor without ever having to log into your blog. Styles, working with resources - everything is here. And it’s free.

Another one is irreplaceable for me and it is called Live Mesh. Once you’ve got your free 5Gb space at Windows Live, called SkyDrive, you can synchronize folders between your multiple computers. Like, for example, between home and work machine, so you can make sure that two folders on these machines are equal. Works perfectly for source code sharing for my notebooks and desktop, as having multiple versions of hundreds of files is a pain.
Another feature of Live Mesh is remote desktop, which works also through proxy and is just great when you want to log into your home computer but don’t want to set the remote desktop NAT rules. At some point it is more secure, as you won’t forget to switch off your rules later.

I know how hard it is to find a gem in a pile of software and services, so if you have a problem that any of these two programs solve, try them out!

File Replacement Utility

by Dmitry Kirsanov 24. August 2011 22:48

Ok, here is another command line tool. This time - for developers who create software made of many components.

Imagine, you have a product which consists of main executable file and multiple dll files. And different people are working on these. And you are deploying it all on multiple machines and never know where it could be hiding. Maybe in some build directories, maybe somewhere else.

So this utility will find all instances of that file and replace with the newest one. Moreover, you can even select the older file, but all files will be replaced by the newest found. Well, there are parameters, of course.

As the searching for files is time consuming, the end result of this utility could be a batch file (.bat) which contains commands to repeat operation. It will take the same source file and put it to the same destinations as during the first run. That way, continuous replacing won't be a problem or take more than a couple of seconds.

So, here it is. Requires .net framework 3.5.

filereplace.rar (5,32 kb)



UPDATE 03/MAY/2016: Updated application to version 1.2.1 - fixed bug when file couldn't be found using the /d switch

7-Zip Converter

by Dmitry Kirsanov 23. August 2011 23:05

7zip

7-Zip is the most effective file archive format, which exceeds by far both ZIP and even RAR in terms of compression level. When I realized that a few years back, and when all tests proved I could store more files without the need of buying new and expensive hard drive, that was kind of relief, as I have a huge repository of files. A few terabytes.

You would ask why do I need so much storage, but the fact is – among other trades I am also a trainer, and I need to store my training materials somewhere. And these are mainly not the media files, which are generally well compressed and couldn’t be squeezed further, but documents and images of hard drives and DVDs (iso files and similar). Anyway – something that could be compressed.

The problem was – all these thousands of files were already compressed by ZIP. The least effective but also the most compatible file format. I own a license for WinRAR, so opening any sort of archive isn’t a problem for me, but I didn’t want to either keep old files in ZIP form when I could compress them up to 10 times better, nor convert ZIP files to 7-ZIP manually. No, I needed to convert ZIP files to 7-ZIP automatically.

WinRAR, is quite useful and user-friendly (even though it has one of the worst customer support in software industry), it's compression ratio is not the best, comparing it to less visually attractive free 7-Zip. However, since my precious archives consuming terabytes of data, and hard drives are still quite expensive, especially when you are planning for some redundancy, space becomes more important than graphical user interface of archiver's shell.

However, one little freeware thing that comes with WinRAR is called “RAR converter”, or “rarcvt”. It comes in form of command line utility and is able, using WinRAR, decompress other archives, be it ZIP, CAB, ARJ or even ISO and RPM into RAR. I wanted that functionality for 7-ZIP, but it was nowhere to be found.

So I had to create it myself. I took Visual Studio and in a few hours made what is called now a 7-ZIP converter. This command line utility was tested on thousands of nested archives and proved to improve the efficiency of data storage from at least 1 and up to 99%. Sometimes there were situations when I couldn’t believe my eyes how it was able to repack the ZIP file into 7-ZIP, and the end file was whopping 100 times smaller than ZIP!

I believe that this utility is essential for file server system administrators, as well as for home servers or even personal notebooks, where storage space is quite limited. It does not require installation, but you should have .NET framework 3.5 installed (you already have it in Windows Vista and Windows 7) and, of course, 7-zip. Config file can be edited in Notepad, it has just 3 parameters - the path to 7-zip, path to temporary directory and extensions of archives that should be converted.

Utility finds files by file mask, may convert nested archives (that is - when you have one archive inside of another), can delete the original file after conversion and may set the time stamp of original file to the resulting 7-zip archive.

Well, here it is!

7-Zip Converter Screenshot

7ZipConverter.7z (6,27 kb)