cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in Run Operating System Command Before/After Message Processing

former_member192892
Active Contributor
0 Kudos

Hi Guys,

Can I rename my input source filename before message processing using

Run Operating System Command Before/After Message Processing functionality??

If yes, how should i go about it.

Thanks

Varun

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

>>Can I rename my input source filename before message processing using

Assume you have given input file name as <b>input1.txt</b> and using OS command before Msg processing, you can change this to <b>input2.txt</b>. Now how will XI know, it has to process <b>input2.txt</b>?

I guess you can not do this. Have not tried it though.

Give it a try and let me know.

Regards,

Jai Shankar

bhavesh_kantilal
Active Contributor
0 Kudos

No you cannot.

Instead you can wrtie a External Script scheduled at the OS level that does that.

Why do you want to change the source filename by the ways? You can always use wild card characters in the filename field

regards

Bhavesh

Former Member
0 Kudos

why would you change the value for Source File name? are you talking about dynamically generating the file name on target side?

former_member192892
Active Contributor
0 Kudos

The idea is that I'm doin an any file type to any file type scenario. My input file does not have any extension. And I want my output file to have an extension .idoc.

Since I'm not using IR at all and using ID only, also I don't want to get involved in custom module developments, as was the solution suggested in one of my previios posts, I'm lookin for an easy way out...

former_member192892
Active Contributor
0 Kudos

And I was thinking on the terms of MS-DOS commands like ren, which i will execute before message processing....

bhavesh_kantilal
Active Contributor
0 Kudos

Varun,

I rememebr your thread yesterday.

In this case another alternate would be to write a Script that can be triggered in the receiver file adapter.

After the file is created without the extension in the target side, trigger this script from the File adapter that will add the extension to all files in that folder and so on.

Quite feasible, but do this on the receievr file adapter!

Regards

Bhavesh

former_member192892
Active Contributor
0 Kudos

Yes Bhavesh...

Should i try giving ren . *.idoc as my command????My server is installed on Windows OS..

Varun

bhavesh_kantilal
Active Contributor
0 Kudos

Not a script / unix expert.

But you will need to write sa script that will rename all the files in the folder with the extension etc and then trigger it from the file adapter as shown in this blog,

/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi

Regards

Bhavesh