Skip to content
⌘ NSIS Forum Archive

How to join two .cfg files in one .cfg

5 posts

M4RC II#

How to join two .cfg files in one .cfg

Hy, I've two .cfg Files (This are files for a config in counter-strike)

Now I would join the file a.cfg with the file b.cfg to a.cfg.

I've tried to join the two files with

File Join but File Join only works with .txt files.

What could I do ?

In .cfg is only text like in a *.txt file.

Sorry when my english isn't very good.
THX
M4RC II#
Hy I've make an example for you the exec.cfg must be join with the autoexec.cfg.



Please help me
Instructor#
Try to debug it, replace line:
	${FileJoin} "$INSTDIR\cstrike\autoexec.cfg" "$INSTDIR\Infos\exec.cfg" "$INSTDIR\cstrike\autoexec.cfg"
with
	IfFileExists "$INSTDIR\cstrike\autoexec.cfg" +2
MessageBox MB_OK "File not exist: $INSTDIR\cstrike\autoexec.cfg"
IfFileExists "$INSTDIR\Infos\exec.cfg" +2
MessageBox MB_OK "File not exist: $INSTDIR\Infos\exec.cfg"

${FileJoin} "$INSTDIR\cstrike\autoexec.cfg" "$INSTDIR\Infos\exec.cfg" "$INSTDIR\cstrike\autoexec.cfg"

IfErrors 0 +2
MessageBox MB_OK "Error: FileJoin"