Start .bat file from script
DraagonStorm
Posts: 748
How would I start a batch file (.bat) from DAZ script and then let the script end while the .bat file continues.
Comments
Are you trying to use the script to write the batch file then launch it or does the batch file already exist?
If you are building the batch try something along this line
var file = new DzFile( batFilename );
file.open( file.WriteOnly )
file.writeLine( buildCommandLine( true, batchPath, "" ) )
file.close()
Use this to launch it
var str = buildCommandLine( false, batchPath, "" )
// debug( str ); // show results of batch file creation
new DzProcess( str ).start();
Keep in mind there is a lot involved in launching an external file.
the basic is as follows
define file location
define file name and extension if needed
add arguments to file if needed
call launch process to start file
if file fails to load have error report
I'll be creating the batch file. Thank You, I'll give this a try.