4 Replies Latest reply: May 15, 2014 9:54 AM by Bruce _ RSS

    Example of Multiple Reports Batch

    Matixsnow _

      I have made an example of a batch script that should open all the files in a folder in Monarch and apply a model to all of them and save them to a folder. 

       

      However, I am confused on how I can use a Wildcard to open all files in a folder (with a .txt extension) and how I can save all of the files to either one xls or multiple xls files with a default file name.  Any suggestions?  Here is the script.

       

       

      START C:"Program Files"MonarchProgrammonarch.exe "X:AEFAAMBRetirement ServicesText Files*.txt" "X:AEFAAMBRetirement ServicesModel FolderHA90080.mod" C:test.xls /t

        • Example of Multiple Reports Batch
          joey

          I do not think that Monarch will allow you to use wildcards when specifying the /rpt: parameter. 

           

          However, you can use this script to concatenate all of your text files into a single huge text file, and process that through Monarch.

           

          [font="courier"] copy C:InputFolder*.txt C:OutputFolderAllFiles.txt /font[/quote]Then you process it through Monarch.  See "Using Monarch command lines" in the help file if you get stuck. 

           

          Let me know how it works.  Hope this helps you out.

          • Example of Multiple Reports Batch
            Dieter _

            Joey,

             

            When you use this script 'copy C:InputFolder*.txt C:OutputFolderAllFiles.txt'

            is it to be used by itself in the command line, or included in the script 'C:"Program Files"MonarchProgrammonarch.exe "X:AEFAAMBRetirement ServicesText Files*.txt" "X:AEFAAMBRetirement ServicesModel FolderHA90080.mod" C:test.xls /t'?

             

            I am having a similar issue in which I have multiple text files and I am trying to get them exported into one . xls file.  Thanks

            • Example of Multiple Reports Batch
              joey

              Monarch won't let you use wildcards in the input filename,unless Data Pump is involved.  You recieve the message "Cannot open file *.txt".

               

              You need a 2 line batch script, something like the following.  The first line creates one large file, and the second line processes it through Monarch. 

               

              [font="courier"]

               

              copy "X:AEFAAMBRetirement ServicesText Files*.txt" "X:AEFAAMBRetirement ServicesText FilesAllFiles.txt"

               

              'C:"Program Files"MonarchProgrammonarch.exe "X:AEFAAMBRetirement ServicesText FilesAllFiles.txt" "X:AEFAAMBRetirement ServicesModel FolderHA90080.mod" C:test.xls /t'

              /font[/quote]

              • Example of Multiple Reports Batch
                Bruce _

                Hello all

                 

                Starting in version 9, Monarch allows you to open multiple text files without merging with the copy command.

                 

                Just use a project file to keep track of all the text files involved and it will look to Monarch that you have one large file and not several smaller ones.

                 

                Regards