cancel
Showing results for 
Search instead for 
Did you mean: 

How to use OS Command in Receiver File Channel to copy file from one location to another

0 Kudos

Hi Experts,

I am looking for an exact OS command to be used in Receiver File channel to copy the file placed in target directory to another directory as well.

Ideally i am picking 2 files status and data files from file server and placing the file in PI directory.Then i need the same data file to be copied to another directory as well for further processing.

I am using the command cp -r /sourcedirectory/filename /targetdirectory1.

The command is executed but file is not getting copied.

For testing purpose i am placing the file in shared folder and picking from there and placing in another shared folder.

Original path from where i am picking the file is like : \\sourcedirectory\FolderA and target path is \\targetdirectory1\FolderB

Please suggest what command should i use.

Regards

Rajat

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Thank you experts..issue has been resolved i got the exact command and able to copy the file.

PI is being hosted on Windows server:

So to Copy use the below command:

xcopy SourceDirectory(Include the filename also) Target Directory

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Rajat,

Instead of using OS commands. Create additional receiver channel.

Have two receiver interfaces in Interface Determination or ICO. Create addition receiver agreement or correct values in outbound processing tab of ICO.

former_member186851
Active Contributor
0 Kudos
0 Kudos

Hi Raghu,

I have already referred the blog but i need to write only single line of command which we can write in the channel itself instead of writing the script and placing on server.

Please let me know if you know the exact OS command to be used.

Regards

Rajat