Announcement Announcement Module
No announcement yet.
Is it possible to send a "rename file on FTP" message Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to send a "rename file on FTP" message

    Hi, I have a colleague that is writing a a batch that needs to poll an FTP, then download the file, then rename/move it on the FTP, then process the file locally, then once finished rename/move the original file on the FTP.

    So the file life on the FTP would be something like :
    0. is put on the FTP by an external entity
    1. downloaded by the SpringIntegration
    2. renamed on the FTP to
    3. is being processed by the bathc
    4. is renamed on the FTP to

    So the idea was to use a channel adapter to perform such rename/move operation through a message.

    Any hints or ideas to explore in order to achieve feature would be very welcome.

    Note, I 'm saying rename/move because the FTP commands RNFR/RNTO are used to rename or move with the whole path.

    Thx in advance
    Last edited by Brice; Mar 6th, 2013, 11:45 AM.

  • #2
    This is not currently supported, but this would be a nice addition to the (S)FTP outbound gateways, which currently support ls, rm, get, mget.

    This would not be a difficult addition because the underlying Session object (FtpSession, SftpSession) has a
    void rename(String pathFrom, String pathTo)

    Feel free to open a 'New Feature' JIRA issue

    If you'd be interested in making a contribution, see:


    • #3
      Hi Gary thx for the info, and sorry for the late reply, we are moving fast so we got with our own solution, still contributing would be interesting. Thx for the proposition. I will see how my schedule pans out...


      • #4
        Actually, I have now implemented it; and there's an open pull request waiting to be merged.


        • #5
          Cool, thx Gary