Counting files in a FTP

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Counting files in a FTP

  • Creator
    Topic
  • #53681
    Jawad Chaudhry
    Participant

    I need some help in creating a report that will count the number of files transmitted using FTP daily. I guess I just need some guidance or an outline of how to obtain a solution.

Viewing 4 reply threads
  • Author
    Replies
    • #78528
      Jim Kosloskey
      Participant

      jawad,

      Do you want to count the files found, files found and processed, or the files sent?

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #78529
      Jawad Chaudhry
      Participant

      I would like to count the files that have been sent.

    • #78530
      David Barr
      Participant

      You need to count them by thread and add up the total.

      You can use “hcimsiutil -dd ” to print the message counts of each thread name, or you could use a script to count the messages in the .idx file of each saved message file. Another option is to put something in the “send ok” proc of each outbound FTP thread that increments a counter.

    • #78531
      Jim Kosloskey
      Participant

      Jawad,

      You want the total of the files not the total messages – is that correct?

      If so then I woul place a Tcl proc in the Outbound thread either Outbound Tps or Send OK Tps. You will need to check the metadata for File name change to know when to add one to a counter. The use of a counter file  might be handly.

      If you have a one to many then you will need to do that for each outbound.

      If you know the number of files found and processed is the same as the number of files sent (for example a one to one) then anothr location could be the Inbound Tps Delete stack where a Tcl proc could increment a counter each time a file is to be deleted.

      One challenge in any case is the need to know when to reset the counter.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #78532
      David Barr
      Participant

      If you are using fileset-ftp protocol with a style of single or eof, then the message count should match the number of files. But Jim has the right answer if you’re putting multiple messages in each file.

      edit: I guess it actually depends on whether or not you are picking unique filenames or using the append option with a single filename.

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

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,447
Topic Tags
288
Empty Topic Tags
10