• Post Reply Bookmark Topic Watch Topic
  • New Topic

Folder creation in remote server  RSS feed

 
Elangovan Narayananasamy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to create the folder in remote machine?

I tried using the file.mkdir() to create folder in remote machine of same LAN network, I could created if the parent folder is shared folder.

But I could not created in other network.

My requirement is,
1. To create folder in same LAN network which is not a shared folder.
2. To create folder in remote machine in another LAN network. Remote machine may be linux and windows.

How to achieve this?
 
Joe Areeda
Ranch Hand
Posts: 334
2
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the remote disk drive is shared your program sees it essentially as a local drive that is why File.mkdir works.

If the drive is not shared then the mkdir command needs to be executed on a remote system that has the drive mounted (locally or shared).

In unix one way to do it is to use the ssh command probably with a certificate with no password if that meets your security requirements.

If you need to be machine independent you will need some sort of remote procedure call, perhaps a roll your own, which is not hard for something this simple but does require a program to be running on each remote system. I'm not sure of a remote procedure mechanism that works on both Windows and Linux.

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