骡子FTP:如何向上移动一个目录?

时间:2013-07-10 11:43:39

标签: ftp mule

我需要在Mule中配置FTP入站端点,到目前为止我得到的是:

<ftp:connector name="ftpConnector" pollingFrequency="1000"
     validateConnections="true"
     moveToDirectory="C:\Users\jonbrynjar.FRETT\Documents\national_registry"
     moveToPattern="*.txt"/>
<ftp:inbound-endpoint host="ftp1.xxxx.is" port="21"
     user="xxxx" password="xxxx" binary="false"
     pollingFrequency="5000" responseTimeout="10000"
     connector-ref="ftpConnector">
  <file:filename-wildcard-filter pattern="../einst.txt" />
</ftp:inbound-endpoint>

我可以通过这种方式在命令提示符下访问此服务器:

user:xxxx
pass:xxx
cd ..
get K0274K.N4503.EIN.E32 einst.txt
get K0274K.N301.F300 fyrirt.txt
bye

我认为问题是我无法按照命令文本中暗示的那样向上移动一个目录!

我如何实施此动作骡子?

1 个答案:

答案 0 :(得分:1)

我建议使用mule的复合源来使用多个源(每个文件夹的路径不同)。

<flow name="MuleRunnerFlow1" doc:name="MuleRunnerFlow1">

<composite-source doc:name="Composite Source">

<ftp:inbound-endpoint host="ftp1.xxxx.is" port="21" user="xxxx" password="xxxx" binary="false" pollingFrequency="5000" responseTimeout="10000" connector-ref="ftpConnector" doc:name="FTP" path="/parent">
<file:filename-wildcard-filter pattern="einst.txt" />
</ftp:inbound-endpoint>

<ftp:inbound-endpoint host="ftp1.xxxx.is" port="21" user="xxxx" password="xxxx" binary="false" pollingFrequency="5000" responseTimeout="10000" connector-ref="ftpConnector2" doc:name="FTP" path="/parent/children">
<file:filename-wildcard-filter pattern="einst.txt" />
</ftp:inbound-endpoint>

</composite-source>

<logger level="INFO" doc:name="Logger" />

</flow>

<flow name="MuleRunnerFlow1" doc:name="MuleRunnerFlow1"> <composite-source doc:name="Composite Source"> <ftp:inbound-endpoint host="ftp1.xxxx.is" port="21" user="xxxx" password="xxxx" binary="false" pollingFrequency="5000" responseTimeout="10000" connector-ref="ftpConnector" doc:name="FTP" path="/parent"> <file:filename-wildcard-filter pattern="einst.txt" /> </ftp:inbound-endpoint> <ftp:inbound-endpoint host="ftp1.xxxx.is" port="21" user="xxxx" password="xxxx" binary="false" pollingFrequency="5000" responseTimeout="10000" connector-ref="ftpConnector2" doc:name="FTP" path="/parent/children"> <file:filename-wildcard-filter pattern="einst.txt" /> </ftp:inbound-endpoint> </composite-source> <logger level="INFO" doc:name="Logger" /> </flow>

您可以根据需要使用两个连接器或相同的连接器,如有必要,您可以从属性文件中获取路径和其他属性

希望这有帮助