Looks like you are trying to develop another file swapping system. . Ok here goes. You already have experience is sending strings over a socket connection. So all you have to do is define a set of commands between the server and the client. For instance once the client connects, the server can send a command "SCAN" to the client. Once the client receives this he starts a scan on a preset directory. However, you may have to preserve the last state of the directory in some place. Say a database. So now you have 2 sets to compare. How much data you compare is left to you from filenames to size to anything else. Once the client completes a scan he can update his database. To upload files to the server automatically, the server should support something like FTP. Establish a data connection and send the files. They can be put on the server. You can make this process an independent thread so users can use other features of the client say chat.
This is one simple design. You can take help from java.net packages for sending commands. Develop the UI with swings and even pass data with DataOutputStream classes. Well thats a very broad perspective. But I guess thats all is possible over the forum. Rest is left to you to explore.
Tx for you reply. Now i made a list of what i should do to make it work - server waits for a connection on a certain port - client tries to connect on server - server acceps connection from client - (on the client is a directory selected) de name and size of every file will be send to the server - server checkes whenever the filename + size already is in its database (that contains all file-information on the server) - if yes? server just goes to the next file - if no? server ask client to upload that file (which is not on the server) - when the whole list is done .. server cloes the connection with the client.
Now i've got the following guestion: How can I get the filenames out of the directory i selected on my client? i have to "read" a filename and send this filename to the server but i don't know how to get that information out of the dir.
Hopefully someone knows a solution to this problem