I have my local computer and I also have a remote computer. I want to make a C program that moves a file or folder to that remote computer. How can I do this in C? Or is this only possible though Terminal commands?
views:
37answers:
2
A:
Of course that is perfectly possible in C. You could write a server process running on one of the computers, listening for incoming network connections, a client process to connect that server and define a protocol how to transfer files. But most probably, you would want to use library implementing some protocol like the scp protocol or http.
For a simple application, the easiest way to get going might be calling scp via the system() function (which is also available if you are not on Linux). If you are on Windows, using some library might be easier because there is no scp by default.
Sven Marnach
2010-10-30 13:06:13