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.