I am trying to run PDF Toolkit with a a list of files to merge to an output file. The list of files must be on the same line as the run command and each file is separated by a space e.g.
Run pdftk.exe file1.pdf file2.pdf file3.pdf fileetc.pdf output filesmerged.pdf
However, the message box in the code below shows 2 problems:
1) the directory name is shown
2) the file names are on separate lines
How do I correct problems 1) and 2)?
Code:
; Based on MULTI-SELECT EXAMPLE from Help File
FileSelectFile, files, M3, *.pdf ; M3 = Multiselect existing files.
if files =
{
MsgBox, The user pressed cancel.
return
}
Loop, parse, files, `n
{
MsgBox, 0, , %files% `n
Run, F:\Program Files\pdftk-1.12\pdftk.exe, %files% output f:\temp\output.pdf
}
return
Many thanks,
Martin