First of all I would like to precise that I am currently learning maxscript. I currently writing a simple script to export my selection, convert it to another format (.hpx wich is ascii based) and modify said .hpx to substitute .tif to .rgb.
CurrentFile = GetFileNameFile MaxFilename
ExportName = "X:\\SIMTHETIQ\\metavr\\P4\\Data\\Main\\Source\\Databases\\Afghanistan\\Openflight\\" + CurrentFile + ".flt"
exportFile Exportname #noPrompt selectedOnly:true
ConvertFormat = "oflt2hpx " + ExportName
HPXName = "X:\\SIMTHETIQ\\metavr\\P4\\Data\\Main\\Source\\Databases\\Afghanistan\\Openflight\\" + CurrentFile + ".hpx"
ConvertTexture = "sed2.exe -e \"s/\.tif/\.rgb/g\" " + HPXName + " > " + HPXName + "temp.txt"
DOSCommand "copy " + HPXName + "temp.txt " + HPXName;
DOSCommand "del " + HPXName + "temp.txt";
The export part is working, conversion to hpx is working too. My problem resides with the Convert texture line. It opens a command prompt and shuts it down right after without doing anything. If I Print ConvertTexture and copy/paste it to a command prompt it runs just fine. I also tried calling a .cmd containing the last 3 lines without any success.
If you see any synthax error or think of another way to substitute text in a ascii file please let me know.
Thanks in advance,