• 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

Folder creation in remote server

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 334
2
Netbeans IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic