1 Reply Latest reply: May 15, 2014 10:00 AM by OMAnalyst _ RSS

    Command Line not working correctly

    OMAnalyst _

      I am trying to execute the following BAT file.  Basically what it is doing, it is making a list of files in a directory that I need to process.  It then reads that file and tries to process them.


      I noticed that when I open the project myself and run the export it works correctly.  When I try to execute the command line and go to project exports, nothing is listed anymore. 


      Can someone please check the syntax and make sure I am not missing anything please.




      @ECHO OFF


      DIR D:\OMG\MONARCH\INPUT /B >> D:\OMG\Monarch\RunFiles\filelist.txt


      For /F %%i in (D:\OMG\Monarch\RunFiles\filelist.txt) Do Call :DoMonarch "%%i"

      GOTO :EOF


      COPY "D:\OMG\Monarch\OUTPUT\CSTM.xls" "D:\OMG\Monarch\OUTPUT\%~1.xls" /V /Z

      ("D:\Program Files\Monarch\Program\Monarch.exe" /rpt:"D:\OMG\Monarch\INPUT\%~1" /prj"D:\OMG\Monarch\Projects\CSTMH.xprj" /exp"D:\OMG\Monarch\OUTPUT\%1.xls" /exptable:"SummaryData" /exptableopt:"overwrite" /T /expfileopt:"add" /pxall)

      ("D:\Program Files\Monarch\Program\Monarch.exe" /rpt:"D:\OMG\Monarch\INPUT\%~1" /prj"D:\OMG\Monarch\Projects\CSTMD.xprj" /exp"D:\OMG\Monarch\OUTPUT\%1.xls" /exptable:"INVDATA" /exptableopt:"overwrite" /T /expfileopt:"add" /pxall)


      GOTO :EOF


      REN "D:\OMG\Monarch\RunFiles\filelist.txt" filelist2.txt


      @ECHO ON