Skip to Content
author's profile photo Former Member
Former Member

How to copy a file before deleting

Hi ,

I have scenario file to idoc. while configuring the sender communication channel(with sender file adaper) the file processing mode should be delete mode but my requirement is i need to copy a file into some other floder before deleting the file from source directory.

Regards

Swathi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Nov 18, 2011 at 06:52 AM

    Hi swathi,

    You can try with file procesing mode "Archieve" and specify the folder name so that the file will be moved to archieved folder.

    Regards

    Priyanka

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2011 at 06:53 AM

    Hi,

    Processing Mode, specify what is to happen to files that have been processed successfully.

    Have you use Archive, ithink its work

    ○ Archive

    ■ To add a time stamp to the file name, select Add Time Stamp.

    The time stamp has the format yyyMMdd-hhMMss-SSS. The time stamp ensures that the archived files are not overwritten and it enables you to sort them according to the time that they were received.

    ■ Enter the name of the Archive Directory.

    regards,

    ganesh.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Swathi,

      You can create 2 receivers channels. One for archiving your source file and one for your orginal receiver channel. On your File receiver channel for archive, you can define the archive directory and the filename of your source file. You can use dynamic config to get the source file.

      You can define the 2 business component/business component on the receiver determination and 2 receiver agreement.

      Regards,

      Jenny

  • Posted on Nov 18, 2011 at 08:05 AM

    Hi Swathi,

    There is a option in sender file adapter called "Run Operating System Command Before message Processing ".

    In that option you need to write as shown below

    if operating system of PI server is unix/linux then type

    cp   %F  /usr/dev/folder
    

    Change the target folder name from /usr/dev/folder to where ever you wish to copy the file

    in case you are working on windows enviornment you can try this

    copy %F   C://usr//dev//temp
    

    Please change the target folder name from C://usr//dev//temp to where ever you wish to copy the file.

    Hope this solves your problem.

    regards

    Anupam

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.