Reply To: Help: Fileset-FTP

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Help: Fileset-FTP Reply To: Help: Fileset-FTP

#56658
Robert Milfajt
Participant

    Hmmmm…  I have a couple of more ideas to try.

    You should move the code to create file_path inside the foreach loop, i.e.,

    Code:

    keylget args MSGID mh
    set data [msgget $mh ]

    foreach file $data {
    set split_data [split $file “/”]
    set filename [lindex $split_data end]
    set file_path [file join $newpath $filename]
    if [file exists $file_path] {
    set old .old
    set old $file_path$old
    # if file already exist, rename it to *.old
    exec mv $file_path $old
    }
    exec cp $file $file_path
    }

    I would put in some debug to return the directory name which the TCL proc is executing in and the value of the variable data.  It could be that you are not getting fully qualified file names and the TCL proc is not executing in the directory where the files in the list are located.  The code may look like:

    Code:

    set curdir [pwd]
    echo “Current directory >$curdir<" echo "File list >$data<"

    Hope this helps,

    Bob

    Robert Milfajt
    Northwestern Medicine
    Chicago, IL