Mule - Delete files with Files Connector
<p>This is my main <code>mule flow</code>:</p>

<pre><code>HTTP &gt; Payload &gt; File (Create) &gt; Property (File Name) JMS
</code></pre>

<p>And that JMS calls to <code>other flow</code> that starts with JMS </p>

<pre><code>JMS &gt; JSON TO XML &gt; File (Delete by file name)
</code></pre>

<p>Firstly, I create a file with the <code>JSON</code> message.</p>

<p>And finally, when <code>JSON</code> message is transformed to <code>XML</code>, I try to <strong>delete</strong> the file by name <strong>calling a property</strong> that tell me the name.</p>

<p>But the files doesn't delete. Its output this action by log:</p>

<pre><code>Writing file to: C:\errors\91fa03a0-dd33-11e5-a0d9-408d5c4c1bf3.dat
</code></pre>

<p>How can I do to <strong>delete</strong> it?</p>

<p>I tried with the option <strong>autoDelete</strong> in the <code>Connector Configuration</code> but it doesn't delete. </p>

<pre><code>&lt;file:connector name="File1" outputPattern="#[message.inboundProperties.fileName]" autoDelete="true" streaming="false" validateConnections="true" doc:name="File"/&gt;
</code></pre>