moving files to different directories

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf moving files to different directories

  • Creator
    Topic
  • #49020
    Nora Katz
    Participant

      I have a directory structure that looks something like this:

      /topdiretory/Doctor1

      /topdirectory/Doctor2

      /topdirectory/Doctor3

      /topdirectory/temp/Doctor1

      /topdirectory/temp/Doctor2

      /topdirectory/temp/Doctor3

      I have results writing to files in the different doctors within their “temp” directories.  Using Advaned Scheduling, I move a specified file from the “temp” directory to the doctor’s “topdirectory”.  Currently, I use the “fileset_local” protocol, which limits me to moving a file from one directory to another directory.  So, that means I would need to create 3 different processes to move all three Doctors files from their respective “temp” directory to their “topdirectory”.   Is there some other way?  Is is possible to create one process to perform all three file transfers?

    Viewing 2 reply threads
    • Author
      Replies
      • #60474
        Charlie Bursell
        Participant

          Yes, providing there is something in the message you can use to identify which is which.

          Simply write what we call a num-file proc and place it it in the OB thread.  In that proc cahnge the DRIVERCTRL metadata to point to where you want the file to go.

          For and example, take a look at the file fileset_numfile_out.tcl in $HCIROOT/contrib.

          This procedure shows changing the file name.  You can cahnge the entire path as well.

        • #60475
          Nora Katz
          Participant

            Thanks for pointing me in the right direction.  The numfile procedure only changed the file name, but I found in the NetConfig file the key for changing the directory also.

            set dvr_clt_str “{FILESET {{OBDIR $dir_name} {OBFILE $file_name}}}”

          • #60476
            Nora Katz
            Participant

              When I create a thread with the “fileset_local” protocol, I put in a inbound directory (/topdirectory/temp/Doctor1).  Does this mean I need to create a separate thread for each directory I want searched?

              /topdirectory/temp/Doctor2

              /topdirectory/temp/Doctor3

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