Reply To: fileset ftp protocol

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf fileset ftp protocol Reply To: fileset ftp protocol

#57156
Rentian Huang
Participant

    William, you can try this, I use it to filter files. Put it in the Directory Parse.

    sam 🙂

    ===================================

    proc tpsFilesetFilter { args } {

    keylget args MODE mode

    keylget args CONTEXT context

    if {![keylget args ARGS.DEBUG debug]} { set debug “0” }

    if {![keylget args ARGS.FILTER filter]} { error “No filter argument provided” }

    set dispList {}

    switch -exact — $mode {

    start {}

    run {

    keylget args MSGID mh

    set data [msgget $mh ]

    set return_files {}

    foreach file $data {

    if [string match $filter $file] {

    lappend return_files $file

    }

    }

    msgset $mh $return_files

    lappend dispList “CONTINUE $mh”

    }

    shutdown {}

    time {}

    default {

    error “Unknown mode ‘$mode’ in tps_fileset_dir_parse”

    }

    }

    return $dispList

    }