cancel
Showing results for 
Search instead for 
Did you mean: 

XI File Adapter: Sender and the use of wildcards in the directory name

Former Member
0 Kudos

Hi,

Quick question for you XI guru's. I have a requirement to <b>read</b> files from an ftp server that live in separate directories like:

/dir1/subdir1/in/

/dir1/subdir2/in/

/dir1/subdir3/in/

I want to setup the communication channel so that it does something like:

/dir1/*/in

Normally I would specify the other directories in the advanced tab however there could be potentially 1000's of subdir's so I want to use a wildcard. Is it possible to do this with a directory name?

I have read this link and it seems to only indicate using wildcards in the filename.

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think.. try as below

It is better to use OS script to read the said three directories.

bcz you know three directories. so you can use OS script file and that file can be configured in Ftp adapter.

OS Command from FTP

Please see the below links

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

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

Chilla

Former Member
0 Kudos

Is the OS script used to move the files into a common directory for processing or is it used for XI to read each of them to locate the file?

Former Member
0 Kudos

Michael, you will not be able to use the OS command in the FTP scenario as the script will be executed on the XIserver only and not on the FTP server.

Cheer's

Answers (5)

Answers (5)

Former Member
0 Kudos

We decided to use a different directory structure to avoid this problem.

Former Member
0 Kudos

Michael,

Try with calling a remote shell in your OS command before message processing.

The remote shell can move all the files in the same directory on the FTP server.

Former Member
0 Kudos

Michael,

If you have to set up for limited number of directories/files..you can specify them under "Advance selection for file source". You can specify here "N" number of files with path.

Hope this will help.

Let us know if you need more details.

Nilesh

Former Member
0 Kudos

Thats the thing - There isn't a fixed number of directories and we are expecting there to be potentially a few thousand subdirectories under the root which I am working. Otherwise I would use the advanced tab and write the static path.

Former Member
0 Kudos

Hi,

Write a shell script to do so.

which you can give in OS commands.

Regards,

Akshay.

agasthuri_doss
Active Contributor
0 Kudos

Hi,

>>I want to setup the communication channel so that it does something like:

/dir1/*/in

To my knowledge it is not possible.

Try using the Advance tab below the file name in File Adapter.

Regards

Agasthuri Doss