TCL code command to direct a file to an external folder

Clovertech Forums Read Only Archives Cloverleaf Tcl Library TCL code command to direct a file to an external folder

  • Creator
    Topic
  • #55437
    Lawrence Nelson
    Participant

      I have a TCL script that I use to look for zero byte files, no MSH, corrupt,  etc.

      – currently the script sends me an email and drops a message in the err db.

      I would like to add in line of code to also drop the file in question “as is” to the following folder :

      /quovadx/ftptransfers/EFT/incoming/zero_byte

      Based on the variables I have in my existing script I took a wild guess and tried this WITHOUT success.

      exec file  /quovadx/ftptransfers/EFT/incoming/zero_byte/$msg

      For the curious –

      basically, I want to do this so my EFT software can find the file and then reuse the file name to find and RESUBMIT the file.

      Thanks for any assistance.

      Lawrence Nelson
      System Architect - MaineHealth IT

    Viewing 2 reply threads
    • Author
      Replies
      • #85320
        Jim Kosloskey
        Participant

          Have you tried the file command?

          set ret_cd [catch {file copy — $source_file_name $target_file_name} err_lit]

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

        • #85321
          Lawrence Nelson
          Participant

            Hi Jim

            Where is this path

            /quovadx/ftptransfers/EFT/incoming/zero_byte/

            expressed in here?

            set ret_cd [catch {file copy — $source_file_name $target_file_name} err_lit]

            Lawrence Nelson
            System Architect - MaineHealth IT

          • #85322
            Jim Kosloskey
            Participant

              If that is your target then it would be in $target_file_name. You don’t need to use a variable in the command but I do.

              Look at the help for the Tcl file command for particulars. It is a powerful command.

              If you would like some further assistance, email me and we can take this off forum.

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

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