PureConnect

 View Only

Discussion Thread View
  • 1.  "Copy File" tool step can't overwrite file it created

    Posted 08-28-2019 22:05
    Hi All,

    Not sure if there's an issue with the "Copy File" tool step in Interaction Designer - and wanting to get a second opinion before delving further.

    When using the "Copy File" step for the first time (i.e. making a copy of an original file to a new file that doesn't yet exist) works as expected:

    For example:
    Source Filename: D:\I3\IC\Resources\OriginalFile.wav
    Destination Filename: D:\I3\IC\Resources\CopiedFile.wav
    Delete Source: Yes
    Overwrite: Yes

    However once this "Copy File" step has created the new copied file - this file cannot be overwritten by the "Copy File" step - even though the outcome path says "Success"

    For example:
    Source Filename: D:\I3\IC\Resources\UpdatedFile.wav
    Destination Filename: D:\I3\IC\Resources\CopiedFile.wav 
    Delete Source: Yes
    Overwrite: Yes

    I tried using the "File Delete" tool step to delete the copied file - but this step fails like the file is locked or can't be found.

    The used the "File Attributes Query" to check the file attributes (and confirm it exists), and the only attribute set was "Archive"

    Read Only: False
    Hidden: False
    System: False
    Archive: True

    I then used  "File Attributes Modify" to change the Archive attribute to False - which worked, but the file still can't be deleted or overwritten.

    Is it possible the "Copy File" step is not letting go of the file that was created and leaving a file handle active? Has anyone else experienced this issue?

    Thanks,
    Jeff.




    #Handlers


  • 2.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-28-2019 22:33
    I'm sure you've thought of / checked this, but is the original file Read Only? If so, then the copy will be too...

    Suggest you try to delete the copy manually from the UI, when logged in as the IC Admin user, to make sure the user is actually able to do this!


  • 3.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-28-2019 22:51
    Hi Paul,

    Thanks for the reply - yes I did check the original file and it's not read only (I also checked it with the "File Attributes Query").

    As I can't access the IC Server (as a PureConnect Cloud customer) I'm unable to try deleting the copied file manually. 

    Cheers,
    Jeff.


    ------------------------------
    Jeff Hoogkamer
    City of Gold Coast
    ------------------------------



  • 4.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-28-2019 22:58
    Hey Jeff,

    You'll have to forgive me because I'm a premise customer, but my understanding is that some handler tools don't function in Genesys hosted cloud environment.  The one that I know for certain doesn't work is execute shell command because it could have potentially disastrous implications if used incorrectly/maliciously.  You may want to reach out to support for clarification on this.

    ------------------------------
    Aaron Lael
    State of Utah
    ------------------------------



  • 5.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-28-2019 23:05
    Hi Aaron,

    I believe this tool step is supposed to work under CaaS.

    This step was actually used/added by the ININ PSO team on a customisation we got a few years ago - but they had to stop using it because it would often fail to overwrite the copied file (sound familiar).

    So I believe it's an issue with the actual tool step - and was hoping someone else (not CaaS) had experienced the same issue.

    Cheers,
    Jeff.

    ------------------------------
    Jeff Hoogkamer
    City of Gold Coast
    ------------------------------



  • 6.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-29-2019 00:49
    Jeff,

    I'm curious as to what you are trying to achieve?

    I'm just thinking that if we know the use-case, then the collective minds of the community might be able to come up with an alternative strategy to work around this issue.....


  • 7.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-29-2019 04:08
    Hi Jeff,
    I suspect the copied file may be still in open state to the same handler tool step.
    You may want to try the following;
    - Use File Open Read toolstep to open the just copied file (it may fail if the file is still open)
    - Use File Close to close the file using the file handle returned in above step
    - Try Copy File again

    Regards

    ------------------------------
    Vineet Kakroo
    FIL Investment Management Ltd
    ------------------------------



  • 8.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-29-2019 04:21
    Thanks Vineet, that worked!

    Adding File Open Read and File Close before the Copy File step allowed the overwrite to occur! It also allowed the File Delete step to work too.


    ------------------------------
    Jeff Hoogkamer
    City of Gold Coast
    ------------------------------



  • 9.  RE: "Copy File" tool step can't overwrite file it created

    Posted 08-29-2019 04:42
    Thanks good Jeff.

    Regards

    ------------------------------
    Vineet Kakroo
    FIL Investment Management Ltd
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources