I currently have this piece of code:

Sub Button1Click(sender As Object, e As EventArgs)

            If dlgFolder.ShowDialog = Windows.Forms.DialogResult.OK Then

                txtPath.Text = dlgFolder.SelectedPath


                    Dim CopyFile As String = Path.Combine(Directory.GetCurrentDirectory, "pdftk.exe")
                    Dim CopyLocation As String = Path.Combine(dlgFolder.SelectedPath, "pdftk.exe")
                    Dim pyScript As String = Path.Combine(Directory.GetCurrentDirectory, "pdfmerge.py")
                    Dim pyLocation As String = Path.Combine(dlgFolder.SelectedPath, "pdfmerge.py")

                    System.IO.File.Copy(CopyFile, CopyLocation, True)
                    System.IO.File.Copy(pyScript, pyLocation, True)

                Catch copyError As IOException
                End Try         
            End If
End Sub

This copies two files in the current working directory (which will be the default install folder) to the selected path from the Fodler Dialog Browser. This works correctly.

Now what I want to do is too run "pdfmerge.py" into the selected folder path. I tried the below code but the script is still running in the current working directory.

Sub BtnNowClick(sender As Object, e As EventArgs)

        Dim myProcess As Process
        Dim processFile As String = Path.Combine(dlgFolder.SelectedPath, "pdfmerge.py")

        myProcess.Start(processFile, dlgFolder.SelectedPath)

    End Sub

Any help please?

6 Years
Discussion Span
Last Post by Reverend Jim
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.