read connector Directory A , and deposit directory B without deleting files

Clovertech Forums Cloverleaf read connector Directory A , and deposit directory B without deleting files

  • Creator
    Topic
  • #121785
    petitPadawan
    Participant

      Hi,
      I need a simple flow to read files from directory A once a week that start with XX and end with .fre, and copy them to directory B.
      The flow works, but files in directory A get deleted – I’d like to keep them. Is this possible?
      I also want to read only directory A without its subdirectories. Is this possible?
      Thanks!

    Viewing 4 reply threads
    • Author
      Replies
      • #121786
        Charlie Bursell
        Participant

          This can be done but how would you keep from reading the same file over and over if not deleted?  Perhaps you could archive them a different directory?

          Try fileset-local protocol

        • #121787
          Jason Russell
          Participant

            This can be done, as Charlie stated, with fileset-local. However, you really want to either have the files renamed or removed so you don’t pick up duplicates. Probably the easiest way to do this is have a process outside of the process (shell scripting, timed event within cloverleaf, etc) that renames the files to something else so cloverleaf can pick them up.

            • Outside process places file named pickmeup.fre
            • script in some place checks for files older than x date/time, or keep a record of the last file picked up.
            • Rename all files after that point to pickmeup.fre.clover (or whatever), and cloverleaf will pick up the file(s) and delete them.
            • Cloverleaf processes files normally.

            There’s a lot of unknowns here which make it difficult to answer the question.

            • Are the files sequential or have date/time stamps?
            • How many and how often are the files placed?
            • Why is it a requirement to keep the files named the same in the same location.
            • Can they not be moved after processing to put them in a different directory (as suggested).

            No matter what method is used, as the files build in a location, they will start to take longer and longer to parse, search, and process.

          • #121788
            petitPadawan
            Participant

              this is a remote server that drops a single file per day,
              used by several applications,
              my cloverleaf must retrieve it once a day, without deleting it.
              until now I used a powershell script, but I would like to make things more professional,
              by integrating it into cloverleaf if possible.

              otherwise as you say, on the server in question, I will put a linux task to copy it into a subdirectory, and cloverleaf will go and get it there and delete it.

              thank you

            • #121789
              Jason Russell
              Participant

                Is this file overwritten daily, or incremented in some fashion (by datetime stamp or counter)?

                 

                edit: Also, is the location of the drive mounted/attached to the computer as a drive, or will it need to be FTP’d in some fashion?

              • #121791
                Jim Kosloskey
                Participant

                  If the source system is taking care of those files so that not deleting them in Cloverleaf is a viable option, you can use the fileset local Delete UPoC (A tcl proc) to control which files Cloverleaf actually deletes. I have a set of procs that (under argument control) provides a fair amount of flexibility to control what files get deleted. You can have those procs if you like, just email me.

                  email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

              Viewing 4 reply threads
              • You must be logged in to reply to this topic.