transferring file

hi there, i have a problem with regards to socket programming.. im done with the client server thing in which the client communicates with the server and ther server response with a hard coded message in my program. now my problem is, how can i make a program like this:

Client:

Enter file to search:(txt file)

then the server looks for the file in its local directory and return that file to the client then display at the command prompt?

is that possible?

thanks!

[502 byte] By [boynextdoora] at [2007-11-26 16:46:24]
# 1
Yes it's possible. Replace hardcoded messages sending code with file searching and file sending code. Very easy.
Michael.Nazarov@sun.coma at 2007-7-8 23:13:49 > top of Java-index,Archived Forums,Socket Programming...
# 2
I think that should be easy. You just need to alter your server program for receiving the name of the file, searching in your directory system and then sending the file along with control information about the file.
elroydsilvaa at 2007-7-8 23:13:49 > top of Java-index,Archived Forums,Socket Programming...