Jump to content
Sign in to follow this  

Join 2 files

Recommended Posts


I want to join 2 binary files using autoit.

Without help I would do something like that (with fileopen ...)


What do think about that ?

Have you a best idea ?


Edited by czmaster

Share this post

Link to post
Share on other sites

Try this function:

Func JoinFile($sFile1, $sFile2, $sFileJoined) ;coded by UEZ 2012
    If Not FileExists($sFile1) Then Return SetError(1, 0, 0)
    If Not FileExists($sFile2) Then Return SetError(2, 0, 0)
    If Not IsString($sFileJoined) Or $sFileJoined = "" Then Return SetError(3, 0, 0)
    $hFile = FileOpen($sFileJoined, 2 + 16)
    If $hFile = -1 Then Return SetError(4, 0, 0)
    FileWrite($hFile, Binary(FileRead($sFile1) & FileRead($sFile2)))
    Return 1



Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post

Link to post
Share on other sites

might want to add a @crlf between files so the last line isn't concatenated with the first line of the second file:

FileWrite($hFile, Binary(FileRead($sFile1) & @crlf & FileRead($sFile2)))

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...