Question

Say I have a file file.txt on my mainframe host xxx.xxx.xxx.xx created by user QWERTY in the path TEST. I would like to ftp this file from mainframe to my unix machine. When I run the code fsDataInputStream=ftpFileSystem.open(new Path ("ftp://QWERTY@xxx.xxx.xxx.xx'TEST/file.txt'") );

the error I get is "Path ftp://QWERTY@xxx.xxx.xxx.xx'TEST/file.txt' is a directory."

On giving fsDataInputStream = ftpFileSystem.open(new Path('TEST/file.txt'), 1000);

I get the error : File 'QWERTY.'/'TEST/file.txt does not exist. It appends the 'QWERTY.'/' on its own.

Any pointers on how to give this file path name ?

Was it helpful?

Solution

I got it working !! The problem was that I was using fTpFileSystem which was on its own appending the username to the connection URL . I instead used other apis of FTP system .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top