cancel
Showing results for 
Search instead for 
Did you mean: 

Wildcard Char "*" not working in File Communication channel's OS Command

Former Member
0 Kudos

Hi All,

I am trying to pick multiple files with same Name but with timestamp and different extensions.

ex:

SAPOpenSalesOrder_YYYYMMDD.dat

SAPOpenSalesOrder_YYYYMMDD.man

SAPOpenSalesOrder_YYYYMMDD.done

I am using the following code at command level to move the above file to another folder (/usr/sap/PI/Out to /usr/sap/PI/In).

mv -f /usr/sap/PI/Out/SAPOpenSalesOrder. /usr/sap/PI/In

But its not working. Any suggestion will help..

Regards,

Venu

Accepted Solutions (0)

Answers (5)

Answers (5)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

why do you move the file ussing a OS command, why dont you select the Processing Mode: Archive

Thanks

Rodrigo P.

Former Member
0 Kudos

Hi,

OS Command can be used only for NFS. If you are using FTP, Use Advance Selection for Source File where you can pick multiple file with exclusuion mask.

Regards,

Abid

Former Member
0 Kudos

Hi All,

I am using NFS and trying to move file from folder /usr/sap/PI/Out to Folder /usr/sap/PI/In using the below command, but its not working.... Any suggestions.. How to move all files..

mv -f /usr/sap/PI/Out/SAPOpenSalesOrder. /usr/sap/PI/In

Thanks,

Venu

Former Member
0 Kudos

Hi Venu,

Did you try by putting / after In like /usr/sap/PI/In/ ?

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

I tried with putting "/" at the end but still its not working.

And as per my req, I need to move these file after the "main file processing" so I am using option " Run operating System Command after Message processing".

Thanks,

Venu

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Venu,

As I know with Processing Mode : Archiving will be enough coz the system wil archive the files once they were proseced by the adapter engine.

i dont think that OS command be necessary. that is if i understud you properly

Thanks

Rodrigo P.

Former Member
0 Kudos

Hi Venu,

You need to run only after message processing, which you are doing is correct.

I am just wondering the line -f in the command we are using is creating any problem? Please see this help:

http://www.computerhope.com/unix/umv.htm

Can you run by removing this -f and see? I have run the move command on my system which is windows server and it worked perfectly for me. I have physically logged in xi server and ran. This the command I have tested:

move xidfiles\inbound\clmin. xidfiles\outbound

This is my folder structure and files so dont worry with naming conventions. It worked for me and the end result is moving 11files which it find in inbound directory to outbound directory.

Did you get any errors in RWB --> communication channel monitoring for this?

Regards,

---Satish

Former Member
0 Kudos

Hi Venu,

Try like this:

mv -f /usr/sap/PI/Out/SAPOpenSalesOrder. /usr/sap/PI/In/

As raj mentioned I hope you are using this on NFS not on FTP. Also if possible try to run this command at OS level i.,e on the command prompt of XI box using Basis guys help.

Regards,

---Satish

former_member181985
Active Contributor
0 Kudos

>mv -f /usr/sap/PI/Out/SAPOpenSalesOrder. /usr/sap/PI/In

This doesnt work.

Try this...

cd /usr/sap/PI/Out
                        for ANYFILE in SAPOpenSalesOrder* ; do
			echo "Found file:  $ANYFILE " 
			mv -Eignore $ANYFILE /usr/sap/PI/In
                        done

Edited by: Praveen Gujjeti on Jun 25, 2010 9:44 AM

Former Member
0 Kudos

Are you doing FTP or NFS? OS Command in file channel can be used only for NFS.

Regards,

Neetesh