And here's the first version for the public. It's small, simple, beautiful and it actually works. Unfortunately, it's still not doing what Zorro expects, because bar files are backwards in time. &^%^$$#@#&*!

I'm afraid coding that last requirement to make bar file fully Zorro compliant will make it much uglier, thus I decided to post this intermediate version. I still think that bar files are poorly designed, CPU cycles are cheap, human time is precious.

While I'm adding the final piece of magic, if anybody can quickly explain how to add a new instrument to Zorro would be helpful. Or point to an existing forum post, I'm sure it popped up before and I might have it bookmarked, but I'll never find it in dozens of bookmarks I collected. This will come handy to not overwrite existing history files, but test with new instrument names.

Code:
#include <default.c>
#include <stdio.h>
#include <windows.h>

typedef struct SYSTEMTIME {
	WORD wYear;
	WORD wMonth;
	WORD wDayOfWeek;
	WORD wDay;
	WORD wHour;
	WORD wMinute;
	WORD wSecond;
	WORD wMilliseconds;
} SYSTEMTIME;

int _stdcall SystemTimeToVariantTime(SYSTEMTIME *lpSystemTime, DATE *pvtime);

DATE ConvertTime(int year, int month, int day, int hour, int minute, int second)
{
	SYSTEMTIME Time;
	DATE vTime;

	memset(&Time, 0, sizeof(SYSTEMTIME));
	Time.wYear = year;
	Time.wMonth = month;
	Time.wDay = day;
	Time.wHour = hour;
	Time.wMinute = minute;
	Time.wSecond = second;

	SystemTimeToVariantTime(&Time, &vTime);
	return vTime;
}

function main()
{
	char line[64];
	int year, month, day, hour, minute, second, bars = 0, errors = 0;
	float open, high, low, close;
	FILE *in, *out;
	TICK tick;

	if (!(out = fopen("export.bar", "wb"))) {
		printf("\ncan't open output file");
		return;
	}

	if (!(in = fopen("EURUSD_M1_201312.csv", "r"))) {
		printf("\ncan't open input file");
		fclose(out);
		return;
	}

	while (fgets(line, 64, in)) {
		bars++;
		if (sscanf(line, "%4d%2d%2d %2d%2d%2d;%f;%f;%f;%f;",
			&year, &month, &day, &hour, &minute, &second,
			&tick.fOpen, &tick.fHigh, &tick.fLow, &tick.fClose) == 10) {
			tick.time = ConvertTime(year, month, day, hour, minute, second);
			if (!fwrite(&tick, sizeof(tick), 1, out)) {
				printf("\nwrite error");
				fclose(in);
				fclose(out);
				return;
			}
		} else {
			errors++;
		}
	}

	fclose(in);
	fclose(out);
	printf("\nConverted: %d bars, %d errors", bars, errors);
}