This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Push/Grab archive file from server  RSS feed

 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone. I'm curious as to how I can program a pushing/grabbing of file. My requirements for the program is as followed:

1) Upon running of Java program, It will initiate a file transfer.
2) There will be no prompting to user on where to download the file to or requires the user to key in anything(eg.Enter).
3) Grab file from server(transfer started).
4) Downloaded file will be download to a given path/destination in the program.

I've managed to find a client-server socket program from an archive forum, which is close to something that I've wanted. However, this program requires the client to press enter to initiate the file transfer. Is there any ways that I can remove keypress "Enter"?





I've went through a number of websites and forums, but can't seem to find any solution on this.

Would be grateful if anyone can tell me what I can do or direct me on how to solve this.

Many thanks!
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The above line waits for a user input, since inFromUser wraps System.in
Remove this line and your program will run like crazy without your intervention
 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitesh.

LoL.. Didn't know that it's so simple. Thanks a lot~!!

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