Hi, tnx for that link & tip. I almost got it working now, there is still a small bug in the code with big data files; as in that it copies & appends everything perfectly but then where it should stop it doesn't and instead appends puts some extra crap. Also the error("reading error") triggers (see code below) so I am probably setting some size variable wrong.

Code:
FILE * _fWrite = fopen(_chr(tmpWrite_str), "a");
	if (_fWrite != NULL) {
		//		error("works");
		FILE * _fRead = fopen(_chr(tmpRead_str), "r");
		if (_fRead != NULL) {
			
			long _lSize;
			char* _buffer;
			size_t _result;
			
			// obtain file size
			fseek (_fRead, 0, SEEK_END);
			_lSize = ftell (_fRead);
			rewind (_fRead);

			// allocate memory to contain the whole file
			_buffer = (char*) malloc (sizeof(char)*_lSize);
			if (_buffer == NULL) error("memory error");

			// copy the file into the buffer
			_result = fread (_buffer, 1, _lSize, _fRead);
			if (_result != _lSize) error("reading error");
			
			// append buffer to write file
			fwrite (_buffer, 1, _lSize, _fWrite);
			
			fclose (_fRead);
			free (_buffer);
		}
		fclose (_fWrite);
	}
	//	else error("error");