Solved on my own.
- Create temporay text files containing the hash (#)
- Merge temporay file and data file
- Delete temporary file.
hash='#';
hashtxt=fopen('Hash.txt', 'w+');
fprintf(hashtxt, hash);
fclose(hashtxt);
system('copy/b Hash.txt+datafile.txt finalfile.txt');
delete Hash.txt;
delete datafile.txt;
"If it looks stupid but it works it ain´t stupid"