Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5558

Add fileExist option to write file with a new name in case file already exists

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.10.0
    • 2.23.0
    • camel-core, camel-ftp
    • None
    • Unknown

    Description

      See nabble
      http://camel.465427.n5.nabble.com/Camel-FTP-component-Append-a-sequence-number-if-the-filename-already-exists-tp5718469.html

      We should allow to configure fileExists=RenameAndRetry option, which allows you to rename the file and retry writing the file again, in case there already exists a file.

      The trick is to find a optimal solution if you append a sequence number to a file. And when there is a lot of files. You kinda want to know what is the highest filename, (some way of listing and sorting).

      Maybe a way to get a list of existing files based on a file name pattern, and a sort configuration. Then people can check in the list, to find a free sequence number to use etc.

      Attachments

        Activity

          People

            onders Onder Sezgin
            davsclaus Claus Ibsen
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: