AcidCorps Posted September 15, 2008 Share Posted September 15, 2008 I'm looking for a way to copy multiple files into one (not an archive) like you can do through CMD using the following command: Copy /b File.ext File2.ext Comb.ext I tried using FileCopy('File.ext' + File2.ext', 'Comb.ext') I tried FileRead then combining the strings then writing a new file neither of these worked what I'm using to test it is a 7z SFX where you combine the archive with a config file and the SFX file: copy /b 7zs.sfx + config.txt + Archive.7z Installer.exe but with the two attempts i've made through autoit I get an unusable EXE I'd like to be able to do this without using @ComSpec or CMD if possible since but if I need to I can do it that way I was just hoping someone else would have another way - Acid Corps Link to comment Share on other sites More sharing options...
weaponx Posted September 15, 2008 Share Posted September 15, 2008 Merging any files into an exe will result in an invalid executable unless the files are pieces of a split exe. Link to comment Share on other sites More sharing options...
AcidCorps Posted September 15, 2008 Author Share Posted September 15, 2008 when i do it with the cmd code i pasted it works perfectly fine as a sfx Link to comment Share on other sites More sharing options...
Skruge Posted September 15, 2008 Share Posted September 15, 2008 I tried FileRead then combining the strings then writing a new fileMake sure you're opening the files in binary mode. Func _FileMerge($s_SrcFile1, $s_SrcFile2, $s_DestFile) ; Read Files in Binary Mode Local $h_File1 = FileOpen($s_SrcFile1 , 16) Local $h_File2 = FileOpen($s_SrcFile2 , 16) FileWrite($s_DestFile, FileRead($h_File1) & FileRead($h_File2)) EndFunc Tested with split.exe. (http://unxutils.sourceforge.net/) [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now