• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Manage Network Files  RSS feed

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Its possyble to copy a file that are in a network location to my computer (C:\)

If yes :

Can someone give me a example in how to open a file that are in a network location, inside my network( For example : \\192.168.200.1\\Clients\\Luis.xls ).

And how to move a file that are in a location to another ( For example : move \\192.168.200.1\\Clients\\Luis.xls to \\192.168.300.3\\Advanced_Clients\\ )
 
Sheriff
Posts: 21465
97
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the OS supports it (so in Linux you need to have samba installed, for instance), you can just use regular files:

Just remember to escape all backslashes. You only need the double backslashes (so 4 in Java code) at the start.
 
Luis Fernandes
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my envoirenment is microsft. its not necessary provide any user and password to access in this files ?

can i replace the network file to a local folder in my machine ?
 
Rob Spoor
Sheriff
Posts: 21465
97
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah right, authentication... I haven't really tried it if you need to logon to the share separately. You need to look into the authentication processes of Java.

As for replacing, basically, if you have access to the drive, you can move and copy to it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!