cancel
Showing results for 
Search instead for 
Did you mean: 

How to mask a file in SFTP adapter

sahithi_moparthi
Contributor
0 Kudos

Hi Everyone,

       We are using SFTP asa  sender adapter.In the sender side,we have to pick the different files from one folder.How is it possible using SFTP.

I have checked the links but they mentiond the file names starts with the same name.

Example:

Folder name:   ABCD

File names : Dummy1.txt

                   Hello2.txt

                   Fine31.txt.

Can anyone throw some light on this ??

Accepted Solutions (0)

Answers (3)

Answers (3)

iaki_vila
Active Contributor
0 Kudos

Hi Sahiti,

In addition to Mark, the regular expression to do an * in the SFTP channel is .*\, for example, Fine.*\.txt  to get Fine31.txt or Fine1.txt or FineHello.txt, etc


Regards.

sahithi_moparthi
Contributor
0 Kudos

Hi,

  Thanks for your reply.But we are using PI7.31,we could not able to see the Exclusivemask and message protocol(SSH),we have filelist and Message protocol as File.Please provide your valuable inputs for below queries:

1.I need to exclude some file like Fine312,i don't want to pick that file.How can i do that using SFTP??

2.After picking the file, i have to place the file at some path by concating one field(I know i can do that using variable substitution).But how is this possible as my filename have different names.

Ex:

Source file:

                  Dummy1.txt 

                   Hello2.txt

                   Fine31.txt.

                   Fine312.txt

Target File:

                  Dummy1_PONumber.txt   

                   Hello2_PONumber.txt

                   Fine31_PONumber.txt.

Please provide your valuable inputs.

former_member182455
Active Contributor
0 Kudos

Hi ,

you can use the dynamic configuration . check the below link.

http://saptechnical.com/Tips/XI/ASMA/Index.htm

http://www.saptechnical.com/Tutorials/XI/Adapterspecific/Attributes.htm

Regards

srinivas

former_member184720
Active Contributor
0 Kudos

I think if you you select additional files option then files wil get processed as attachment but not the main payload.

Why don't you write a regular expression to exclude the required files? like for the above case

(?!Fine312).*\.txt should work for you.. It'll pick all .txt files except Fine312..

Regarding the file name.. you can make use of the Dynamic configuration

former_member182455
Active Contributor
0 Kudos

Hi,

You can use file name as * or *.*

Regards

srinivas


markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

Check advanced source file selection and then input your files one-by-one e.g

But it will still pick up the files one-by-one. If you want them to be picked-up at the same time, zip them first then pickup via SFTP.

Regards,

Mark