• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to access remote filesystem  RSS feed

 
Prathamesh Gaddam
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I'm not sure whether its the right category to post this topic. Regret any inconvenience caused.

Presently we are accessing remote sytem with Windows-RDC (with credentials and IP-address) and accessing the filesystem and access the files. However we need to do it programatically to list the files from a specified directory with java.

How to proceed. Note, the directories are not shared nor they are network drives. Googling, the options (RDC, PuTTY, JRDesktop etc) are confusing me.

Any clue/guidance will be very helpful. Thank you in advance.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The http://jcifs.samba.org/ library let's you access SMB directories using IP address and username/password. I'm not sure if those directories would need to be shared for that to work, but it seems worthwhile checking out.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If simple file sharing is turned off you can access any drive on a Windows machine by replacing the : with a $. For instance, \\windowsmachine\C$ will give you access to C:\ of that machine. It will use Windows authentication, so you will need to be a local admin (I believe, possibly a local user or power user is good enough).
 
Prathamesh Gaddam
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ulf. I had checked it earlier. However I didnt found the user/developer guide to proceed, for a newbie. I'll give one more try.

Rob, thank you for the tip. I tried to check it as \\someIPAddress\\C$. And it gave 'Network Not found' message. Is it the right what m I doing?

However Rob, I need to acces the remote system over internet or the network connected by VPN. I guess the clue might not work. Further we will not be given admin rights either our nor remote side.

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had checked it earlier. However I didnt found the user/developer guide to proceed, for a newbie. I'll give one more try.

Check again. The download contains documentation and many examples.

I need to acces the remote system over internet or the network connected by VPN. I guess the clue might not work.

Why not? You're providing the IP address, after all. I *think* that it will only work if the client machine is also running Windows; JVMs on other operating systems don't know enough about SMB to make this work (in which case you'd have to resort to jCIFS).
 
Prathamesh Gaddam
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ulf, You are right! I'm able to access it. The folder is password protected so I'm going with the drive map option to access with Java.

Please assist as how can I proceed with/in java to find/fetch/delete mapping of shared network drive. http://stackoverflow.com/questions/208839/how-can-i-mount-a-windows-drive-in-java/1559702#1559702 link will describe my issues.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!