SFTP_JAVA Job appends Path parameter to file name

Document ID : KB000100104
Last Modified Date : 05/06/2018
Show Technical Document Details
Issue:
SFTP_JAVA may append part of the Path parameter to the Remote File/Patten value if the Remote Path value does not contain a trailing slash.

Because it is generally required that a path contains a trailing slash, this issue only occurs if the remote server does not accept a trailing slash in the Remote Path.

Example:
Remote Path = /home/test
Remote File/Pattern = test.txt

Results:
cd to - /home/test done
local = C:\user_tests\test.txt remote = /home/testtest.txt
put C:\user_tests\test.txt /home/testtest.txt Successful

 
Resolution:
Solution:
Refer to remote server's OS admin regarding why the server is not accepting a trailing slash for an SFTP path value.

Workaround:
Add a "leading" slash to the Remote File/Pattern value. The remote  server should interpret this as a trailing slash to the remote path value.

Example:
Remote Path = /home/test
Remote File/Pattern = /test.txt

Results:
cd to - /home/test done
local = C:\user_tests\test.txt remote = /home/testtest.txt
put C:\user_tests\test.txt /home/test/test.txt Successful