FTP – Check File Age?

Clovertech Forums Read Only Archives Cloverleaf General FTP – Check File Age?

  • Creator
    Topic
  • #53907
    Keith McLeod
    Participant

      Does anyone have a proc or method to check the file age on another system when picking up files? Or whether the file is open? so the file is not picked up before its time.

      It would be nice if Cloverleaf could poll and not pick up files unless they are older than 2 minutes for example.

    Viewing 2 reply threads
    • Author
      Replies
      • #79480

        Keith, the capability to do this is in Cloverleaf TPS. The Tcl FTP package is relatively easy to use and is included with the Cloverleaf installation. Using the package, create a proc that returns a list of valid files to pickup. The fields in the NetConfig where you would place this proc is TPS Directory Parse and possibly TPS Deletion.

        Another options is to use a timer thread and a UPoC tcl proc coded using the tcl ftp package.

        -- Max Drown (Infor)

      • #79481
        Charlie Bursell
        Participant

          If you have Cloverleaf 6.0+ this capability is there.  In a Fileset protocol you can get a long directory listing which will have size, last mod time, etc..  You can make your decisions based on that.

          If you do not have Cloverleaf 6.0+ I would use TclCurl

        • #79482
          Russ Ross
          Participant

            So far I’ve been able to not have to go that far by doing a simple trick of having the file name with somehting like “_hide” on the end of the file name and then have it renamed without the “_hide” when the file is ready.

            Russ Ross
            RussRoss318@gmail.com

        Viewing 2 reply threads
        • The forum ‘General’ is closed to new topics and replies.