title: how to use value of #[server.dateTime.weekOfYear] in mule-app.properties or configuration xml
body: <p>I am downloading files from FTP. I am able to download files with defined patterns or defined name and pass then process these files in Java.</p>
  
  <p>Problem I am facing is that I need to download a new file every week. The file name is like <code>"constant-prefix-2013-W51.zip"</code>. My current XML is like this;</p>
  
  <pre><code>&lt;ftp:inbound-endpoint 
      host="${ftp.host}" 
      port="${ftp.port}" 
      path="${ftp.pathInbound}" 
      user="${ftp.user}" 
      password="${ftp.password}" 
      responseTimeout="10000" 
      doc:name="KBB_FTP" &gt;
  
      &lt;file:filename-wildcard-filter pattern="MyFile-2013-W51.zip"/&gt;
  
  &lt;/ftp:inbound-endpoint&gt;
  </code></pre>
  
  <blockquote>
    <h3>Flow Reference: <a href="https://stackoverflow.com/questions/20657425/mule-how-to-pass-file-from-ftp-to-java-class-in-mule-esb/">Mule: How to pass File from FTP to Java class in Mule ESB?</a></h3>
  </blockquote>
  
  <p>This code downloads the requested file successfully. But I need to add the <code>year</code> and <code>week</code> value dynamically in file pattern.</p>
  
  <p>I have tried following patterns but no success;</p>
  
  <pre><code> 1. pattern="MyFile-2013-W#[server.dateTime.weekOfYear].zip" 
  
   2. pattern="MyFile-2013-W${server.dateTime.weekOfYear}.zip"
  </code></pre>
  
  <p>I know second pattern is totally wrong as it is not a property which is defined in <code>.properties</code> file. I also added a property in mule-app.properties like this</p>
  
  <pre><code> calendar.weekOfYear=#[server.dateTime.weekOfYear]
  </code></pre>
  
  <p>and used following pattern;</p>
  
  <pre><code> 3. pattern="MyFile-2013-W${calendar.weekOfYear}.zip"
  </code></pre>
  
  <p>None of this way is working, I want to add year value like <code>2013</code> and week value like <code>51</code> dynamically which is not happening in any case. Value which appends to fileName is only above string patterns, not any digit..</p>