6 Replies Latest reply: May 15, 2014 9:56 AM by RalphB _ RSS

    Monarch export using a customized file suffix

    beckyz _

      I have a text export that I'd like to add a file extension such FILENAME.dsi but it is a text file.  However, when I open the export I lines are not lined up.  If I export as text only without the dsi, the file looks exactly as it should.  I have this project scripted so is there a work around that in the script itself.  Any help would be very appreciated.  Thanks.

        • Monarch export using a customized file suffix
          Nick Osdale-Popa

          Why not just rename the export file in your script after the export is complete?

          • Monarch export using a customized file suffix
            beckyz _

            I'm not an expert on scripting but the script is executing various projects and exporting various files to one folder. I'd like to eliminate having to go the exported files and manually changing the file extension (this is so they can be manually uploaded to another system).  One line in the script is:

            /prj:"W:DailyOpsInvoiceProcessingTeamGCClaimsMonarchProjectsTechEmailsUploadA1.xprj" /pxallWhat do I add to the script to change the file suffix?  Thanks.

            • Monarch export using a customized file suffix
              Tom2 _

              It has been some time since I wrote any batch files for use with AutoScript but if you are using autoscript you can just use a copy command in dos after the exports are performed and copy it to the required extension:

              copy c:filename.txt c:filename.dsi

              to get the appropriate extension. Your file still has the appropriate text formating and your step is automated.

              • Monarch export using a customized file suffix
                Nick Osdale-Popa

                Originally posted by Tom:

                It has been some time since I wrote any batch files for use with AutoScript but if you are using autoscript you can just use a copy command in dos after the exports are performed and copy it to the required extension:

                copy c:filename.txt c:filename.dsi

                to get the appropriate extension. Your file still has the appropriate text formating and your step is automated. /b[/quote]That's what I was trying to get at, but only using the RENAME command. Correct me if I'm wrong, but aren't all DOS Batch commands available to AutoScript? I don't really know since I don't use it.

                • Monarch export using a customized file suffix
                  beckyz _

                  That sounds like a great solution but I have a problem. The file names can be from 1 to 100 because I export all filters in the project.  I don't know if it would be feasible to set up 100 file renames.  Thanks I could use that in other projects I have but probably not for this one.

                  Thanks again.

                  • Monarch export using a customized file suffix
                    RalphB _

                    Becky, are all the file put into a separate directory?  If so, you could just do a wildcard rename like c:filepath.txt c:filepath.dsi.  This will rename all files with a .txt extension to .dsi.  If there are other files you don't want to rename in that directory but the files you want have a similar name, just use the shared part of the name and replace the variable part with an "*" like filename or filename.