Hi All,
How do you run an executable that normally has to be run from the Windows Command Prompt? The EXE of interest is normally done by typing mrsidsdw.exe <dir>/sidFile.sid, while in the specific directory of the EXE. I want to get this EXE to batch process (it normally runs one at a time). In the current case, I have the EXE and the files in the same directory.
I have tried a few things, including the below code -- no luck. It runs without errors, but the EXE isn't executed b/c a file should be created out of it, but none is.
Any suggestions would be greatly appreciated!!!
How do you run an executable that normally has to be run from the Windows Command Prompt? The EXE of interest is normally done by typing mrsidsdw.exe <dir>/sidFile.sid, while in the specific directory of the EXE. I want to get this EXE to batch process (it normally runs one at a time). In the current case, I have the EXE and the files in the same directory.
I have tried a few things, including the below code -- no luck. It runs without errors, but the EXE isn't executed b/c a file should be created out of it, but none is.
Code:
# Set the workspace. gp.Workspace = r"C:\Documents and Settings\jenn5214\My Documents\Projects\Process SDW" # List all the raster datasets sidList = gp.ListRasters("*", "SID") # Grab the first raster dataset. sid = sidList.Next() # Loop through each raster dataset while sid: os.system("mrsidsdw.exe " + sid) print sid sid = sidList.Next() print "done!"
Comment