• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to traverse in Remote AIX Server?  RSS feed

 
santosh batta
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I've a requirement to upload/download files from/to Remote AIX box. My system is running on windows. I'm using SFTP API (jscape product) to establish connection with the Remote Server. Now, I'm able to connect to the Server & able to download files to my desired location on the local system. Unfortunately, I'm not able to do the same with the Remote machine. i.e. I want to traverse through the remote machine & download from/upload to my desired location on the Remote machine also.

While creating the connection, I've a constuctor to specify the local path & so I'm able to download the files to that location. But I found no such option with Remote server to change the default location. Would some one please help me?

FYI, when I use upload(java.io.File file, java.lang.String remoteDirectory) method, the system is trying to connect with initial parameters taking the remote directory as /home/username//remoteDirectory. So, I assume that the remote Directory which I pass as an argument is not been taken up as the initial parameter to establish connection. It is taking the default home directory as initial parameter & appending my argument to it.

As a result, I'm getting error... that the remote location "/home/username//remoteDirectory" can't be found on server which indeed is correct. Would someone advice me how to get rid of this?

Thanks in advance
 
Pat Farrell
Rancher
Posts: 4686
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
santosh batta wrote:that the remote location "/home/username//remoteDirectory" can't be found on server which indeed is correct. Would someone advice me how to get rid of this?


get rid of the double slash in the file name. A good AIX file name could be /home/santosh/somedir

Second, is "username" really the username?
Third, do you really want it in a subdirectory named "remoteDirectory"? I bet not.
 
santosh batta
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Farrell,
Thanks for your reply. I think, i found the method for the requirement. setDir(java.lang.String remoteDir) is the method, what I'm looking for. It skipped my mind then. Thanks!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!