3 Replies Latest reply: May 15, 2014 10:02 AM by americannb _ RSS

    Export prf to plain text

    americannb _

      I've searched around and there is some really good information about detailed and complicated automated batch exports, but I need to do something pretty simple (I hope).  I have a ton of prf files that I need exported or converted into plain text so I can pull the info into my COLD storage system.  I don't need to filter for any data in particular or anything like that, just the whole thing in plain text.  If I can get the syntax right for doing that, then I can figure a way to have it check all my .prf folders.  If this has already been addressed, just a link would be great!

       

      Thanks!

        • Export prf to plain text
          Data Kruncher

          Hello, and welcome to the forum.

           

          If you can put all of your prf files into a single folder, [URL="http://www.monarchforums.com/showpost.php?p=395&postcount=14"]a batch file solution such as that presented some time ago by Nick[/URL] would work nicely for you. With a slight change to account for the prf files and the text export, of course.

           

          I would expect your Monarch line to look something like:

           

          "c:\program files\monarch\program\monarch" /R /rpt:"%~i" /exp:"C:\COLD\prffiles.txt" /expfileopt:add[/code]

           

          Although my limited test seems to indicate that the export runs from the Table window, even with the Report window specified.

           

          If that's OK with you, then great. If not then we'll need to work on this a bit more.

           

          This code also creates a single output file, adding the text from each prf as it goes. Again, a change would be necessary if you need a separate text file for each prf file.

           

          HTH,

          Kruncher

            • Export prf to plain text
              americannb _

              Thank you for getting back with me!  This looks like what I'm after.  I do need each prf file to export to its own text file, but I'm guessing if I leave off the "/expfileopt:add" switch at the end, that may give me what I want.   Nick's info will make the process a lot easier too.  I'll check that out more closely.

               

              Thanks again!

                • Export prf to plain text
                  americannb _

                  OK, I've combined some things and have been playing with this.  This is what I have so far:

                   

                  @echo off

                  SETLOCAL

                  For %%i in ("
                  server\folder\folder\reports\*.*") Do Call "c:\program files\monarch\program\monarch" "%%i" /R /exp:C:\e-reports\test.txt

                  ENDLOCAL

                  GOTO :EOF

                   

                   

                  It steps through the files just fine, but the Monarch export window pops up saying "Export Failed" on every .prf file.  I can manually do the export just fine from within Monarch, but the automation fails.  Am I missing something?

                   

                  Thanks!