Another approach could be to use a protocal such as
FTP or HTTP to transfer both files and control data.
This has the advantage that you won't have to invent your own protocol. HTTP (as to my opinion) provides more options than
FTP ... furthermore it's easier to secure it using some kind of encryption (Digest ...).
FTP as defined as internet standrad does not provide such facility. Therefore you would have to use SSL to extend the
FTP protocol to your needs.
AFAIK
Indy provides both ... HTTP server/client and
FTP server/client components.