• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to traverse in Remote AIX Server?

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
I like tacos! And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic