Windows Fileset local read file, rename to new folder

Clovertech Forums Read Only Archives Cloverleaf Support Web Windows Fileset local read file, rename to new folder

  • Creator
    Topic
  • #55110
    Donna Bailey
    Participant

      I am working on an interface where I need to take a pdf file and rename it..don’t need to read the file, just pull in the filename.  I pull the name apart and create a new filename for the PDF to go to Meditech.  

      I have the following problem: I am trying to do a copy of the file and it’s not working cause I believe the fileset-local removes it before my copy can happen

      I know of a work-around, to put copy of file to another folder.  Does anyone have any other suggestions?  Did I mention this is Windows too….

      Thanks,

      Donna

      Donna Bailey
      Tele: 315-729-3805
      dbailey@microstar.health
      Micro Star Inc.

    Viewing 5 reply threads
    • Author
      Replies
      • #84129
        Charlie Bursell
        Participant

          Why are you reading via Fileset/Local and then try to copy?

          Just run it through  the engine and output to a different file.

          Also if you define a deletion proc for our Fileset/Local interface you can write out a copy there.

          Need to know more

        • #84130

          Donna, the fileset protocols do delete the files by default. You can control the files that are processed and the files that are deleted using TPS procs.

          The procs called in these TPS fields work on a list of files (not message content).

          You can add code to these procs to manipulate the files manually, such as renaming them or moving them.

          Search the forum for examples of these procs and how they work.

          -- Max Drown (Infor)

        • #84131
          Donna Bailey
          Participant

            Max, thank you for the input…so right now my copy is happening on the route..I need to put in on the tps inbound instead?

            Charlie, I have to copy to a unc path…couldn’t get outbound thread to do that??

            Thank you,

            Donna

            Donna Bailey
            Tele: 315-729-3805
            dbailey@microstar.health
            Micro Star Inc.

          • #84132

            Most likely you’ll need to put the copy in the Fileset-local TPS proc (in the protocol not inbound TPS).

            -- Max Drown (Infor)

          • #84133
            Charlie Bursell
            Participant

              Donna

              It seems to me you do not need to route the file, just copy it

              First, it could be easily done outside of Cloverleaf with the Windows scheduler

              If you want to use Cloverleaf just use Fileset/Local with a timer.  Have it run periodically and when file is there you could read it in and then write with a different name then delete original.  Be sure and use binary mode.

              You can also simply copy using the Tcl file copy command and then delete.  This is the better option

              If you still want to use Fileset/Local and read into the engine you will have to use a file delete proc under the Fileset/Locol protocol as Max said

              I hope this helps

            • #84134
              Donna Bailey
              Participant

                Thank You all!!

                Donna

                Donna Bailey
                Tele: 315-729-3805
                dbailey@microstar.health
                Micro Star Inc.

            Viewing 5 reply threads
            • The forum ‘Support Web’ is closed to new topics and replies.