Topic
  • 1 reply
  • Latest Post - ‏2013-09-13T12:49:24Z by AndrewatFindel
AndrewatFindel
AndrewatFindel
35 Posts

Pinned topic Export path

‏2013-09-06T11:42:35Z |

We can set our file names for generated files with arg0.getOutput().setProperty("$name", "DDServiceReport.csv");
How do we expand this to set the output folder.

We want to nominate a set folder on the PIM server where a weekly export job will create files.  

  • AndrewatFindel
    AndrewatFindel
    35 Posts

    Re: Export path

    ‏2013-09-13T12:49:24Z  

    The answer is easy - Java not PIM!

    Normally we use a line like:
                                  Writer out2 = arg0.getOutput().getWriter();

    To get the writer to send the report to:
    All we have to do is use standard Java like

                                  PrintWriter out = null;
                                  try {
                                                 out = new PrintWriter("/akdoc/TestFile.csv");
                                                 out.write("test");
                                                 out.write("test");
                                                 out.flush();
                                                 out.close();
                                  }catch(Exception e) {}