<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Specifying working directory when running a job from inside TOS in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197027#M947</link>
    <description>hi all,
&lt;BR /&gt;and to go further and follow willm said , by that way you can assign value for you contexte variable "on the fly" in your script file with :
&lt;BR /&gt;
&lt;PRE&gt;context_param workingDirectory=/absolutePath/files/logs&lt;/PRE&gt;
&lt;BR /&gt;depending on your environment execution (dev,int,prod,etc)
&lt;BR /&gt;regards
&lt;BR /&gt;laurent</description>
    <pubDate>Mon, 14 Apr 2014 09:27:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-04-14T09:27:26Z</dc:date>
    <item>
      <title>Specifying working directory when running a job from inside TOS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197025#M945</link>
      <description>Hi
&lt;BR /&gt;I have the requirement to use absolute paths. When exporting TOS jobs logs are created in the folder I export the job to, and this works fine. 
&lt;BR /&gt;However, when I run the job from inside TOS log files are written in the TOS Installation directory. I need to specify a different working directory to which logs and files have to be stored.
&lt;BR /&gt;Specifically, I am using a tFileOutputDelimited component with filename property = to 
&lt;BR /&gt;".//LOG//LOG_" + jobName + "_" + TalendDate.getDate("yyyyMMdd_HHmm") + ".log"
&lt;BR /&gt;is that possible? is there a configuration item I am missing?
&lt;BR /&gt;thank you
&lt;BR /&gt;Shine</description>
      <pubDate>Wed, 09 Apr 2014 13:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197025#M945</guid>
      <dc:creator>Shinesei</dc:creator>
      <dc:date>2014-04-09T13:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying working directory when running a job from inside TOS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197026#M946</link>
      <description>shinesei - you're absolutely on the right path... To make it even better, create a context variable and assign it the default directory path, for example, context.workingDirectory = "//ServerName/Directory1".&lt;BR /&gt;Wherever you need to write to that directory, you'd use&lt;BR /&gt;context.workingDirectory + "/" +  jobName + "_" +  TalendDate.getDate("yyyyMMdd_HHmm") + ".log"&lt;BR /&gt;This way, you can change that working directory on the fly...</description>
      <pubDate>Wed, 09 Apr 2014 14:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197026#M946</guid>
      <dc:creator>willm1</dc:creator>
      <dc:date>2014-04-09T14:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying working directory when running a job from inside TOS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197027#M947</link>
      <description>hi all,
&lt;BR /&gt;and to go further and follow willm said , by that way you can assign value for you contexte variable "on the fly" in your script file with :
&lt;BR /&gt;
&lt;PRE&gt;context_param workingDirectory=/absolutePath/files/logs&lt;/PRE&gt;
&lt;BR /&gt;depending on your environment execution (dev,int,prod,etc)
&lt;BR /&gt;regards
&lt;BR /&gt;laurent</description>
      <pubDate>Mon, 14 Apr 2014 09:27:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197027#M947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-14T09:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying working directory when running a job from inside TOS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197028#M948</link>
      <description>Hi, 
&lt;BR /&gt;I have experimented with one more good idea to use system variable... 
&lt;BR /&gt;System.getProperty("user.dir")+"/_logs/"); 
&lt;BR /&gt;This creates a directory for me to log. If it is in TOS, then current directory or when exported, it would use the exported current directory... 
&lt;BR /&gt;I found it more useful... Again this value is set into the routine and I am calling the routine for log file path... Even you can use some context variable if needed for the purpose of dynamic log folder name. 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Mon, 14 Apr 2014 11:44:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Specifying-working-directory-when-running-a-job-from-inside-TOS/m-p/2197028#M948</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-14T11:44:42Z</dc:date>
    </item>
  </channel>
</rss>

