2 Replies Latest reply: May 15, 2014 9:58 AM by mclark _ RSS

    DATE in Export FileName

    mclark _

      Does anyone know of a way to include the date as part of the filename when exporting from Monarch? i.e. C:myfile20051215.txt. Some trick? A new enhancement on the way? Thanks, Michele

        • DATE in Export FileName
          Steve Caiels

          Hi Michele,

           

          Datapump has this functionality.  However, if you are not able to justify this excellent product, then you could create a workaround using batch files and project exports

           

          1.     Create a calculated field using the formula

          "copy myfile.txt myfile"strip(dtoc(date()),"/")".txt"

           

          This will evaluate to

          copy myfiletoday.txt myfile12202005.txt

          for today’s date.

           

          If you really need 20051220 format then you could use

           

          "copy myfile.txt "+

          rsplit(dtoc(date()),3,"/",1)+

          rsplit(dtoc(date()),3,"/",2)+

          rsplit(dtoc(date()),3,"/",3)+".txt"

           

          2.     Create a summary using this calculated field as a key.  No measure is needed. By de-selecting the subtotal from the general tab in the summary and removing the tick in the “Include field names…” on the Export and Clipboard options, you should end up with a single line summary.

          3.     Create a project export to export your desired data as myfile.txt

          4.     Create a project export to export the new summary to a fixed width text file called file_rename.bat

          5.     Save the project as myfile.xprj

          6.     Create a batch file to run the Monarch Project Export then run the batch file “file_rename.bat”

           

           

          I use a similar procedure at home to randomly select 4 pictures from my home pictures folder and subfolders, rename them to a standard name, resize then, then ftp them to my web site  :cool:    :rolleyes: 

           

          Regards,

          Steve.

          • DATE in Export FileName
            mclark _

            Brilliant! I knew one of you geniuses would have a way. The only other thing I had to do was uncheck the "Put quotes around character field" in the export options.  Thanks