Perfetto, cercando in rete ho trovato questo esempio:
Dim proc As Process = Nothing
Try
Dim batDir As String = String.Format("C:\pluto\")
proc = New Process()
proc.StartInfo.WorkingDirectory = batDir
proc.StartInfo.FileName = "mio.bat"
proc.StartInfo.CreateNoWindow = False
proc.Start()
proc.WaitForExit()
MessageBox.Show("FILE XML GENERATO CORRETTAMENTE !!")
Catch ex As Exception
Console.WriteLine(ex.StackTrace.ToString())
End Try
dove mio.bat è nella directory pippo e mi funziona benissimo, solo che avrei bisogno di parametrizzare il contenuto del file mio.bat che è il seguente:
@echo off
START C:/pippo/paperino/giggio 125.TXT 125.XML
dove giggio è un exe che trasforma un file txt in xml, ma che ogni volta cambia; ad esempio può essere 126.txt o 127.txt etc etc.
Il file txt non può quindi essere una costante come nel mio file mio.bat.......ma non so come fare a parametrizzare questa variabile.
Spero di essere stato chiaro e grazie ancora nessuno
Massimo
|