on 10-21-2014 7:25 PM
Hi All,
We are using SFTP sender channel to process the file.
The challenge is - We are not able to process & Archive the file if the file does not have any extension. (ie : .txt)
We used different wildcard characters also but no luck.
Few more information :
File name in sftp server to process is : I061_141020_123411
Directory configured in SFTP sender channel : /IN
File name configured in SFTP sender channel : I061*.*
Archive file on SFTP server : /Archive
We are getting mainly two errors/longs in the channel. :
- No new file.. or...
- Exception received: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Thank you.
Ramiz.
Hi All,
If you have filename define issue in sender SFTP adapter. Please check below.
E.G my file name is ABC_<timestamp>.txt or ABC_<timestamp>.TXT
Then I need to define ^ABC_[\s\S]*\.[tT][xX][tT]$
^ABC_: start with ABC_
[\s\S]*: any string value between the prefix and extention.
\.: the dot
[tT][xX][tT]$: end with "txt" case-insensitive
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramiz
The filename field in the SFTP sender adapter requires a regular expression. The behavior is different from the normal File/FTP adapter.
To use the character * in regular expressions, it needs a preceding element.
Try using the following to see if it works:-
I061.*
The above regular expression will search for any names that starts with I061 followed by any single character (.) that occurs zero or more times (*)
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eng Swee,
Yes. I tried that too... But it gave me error while Archiving : "String index out of range: -1"
It looks like the archiving module is always looking for some extension.
Exception received: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Transfer finished, average speed was 262.8 KiB/s
Initializing transfer operation GET with source /SAPPI/SAPINB/I061/I061_141020_151515 and size 126.7 KiB
Processing file I061_141020_151515
Found 1 file
Directory under file Path 5 returned {1}. These include directories and links.
Listing /SAPPI/SAPINB/I061/
I have open sap message for this. Lets see what solutions they are providing.
Thank you for the reply.
Regards,
Ramiz.
Hi Ramiz,
It should work with I061*
Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes Osman, File is getting processed and archived when file has any extension.
The interesting thing is :
File w/o extension is getting processed & archived on File system (NFS mount) but not on SFTP server.
But my requirement is to archive in SFTP server only from where I am processing the file.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.