automatic file upload

  • Thread starter Thread starter David Perez Essenwanger
  • Start date Start date
D

David Perez Essenwanger

Hi,

is there a way to create a windows application that runs in a scheduled
task to upload files from one server to another automatically?

Any suggestion would be really appreciated

Thanks

David
 
Well, one way you could approach the problem would be to have 2 apps,
one on each server.

The application on the source server runs whenever you schedule it.
It picks up the file and sends it to the target server.

On the target server you make a small daemon/service that is running
always and is always ready to receive the file from the source.

How the file(s) should be sent is depending on many things.
For instance, if the source server has immediate access to the target
server (for instance if the target server is a mapped drive), you
wouldn't even need a daemon on the target: the scheduled task on the
source could simply copy the file to the target (assuming it has proper
permissions).

A different way you could send the file across the wire is over HTTP.
In that case your sending app should be able to create an
HttpWebRequest that includes the file and the receiving app should be
able to receive the request, extrapolate the file content and save it
where it should go (it should also send back an HttpWebResponse saying
that the operation succeeded or failed).

I'm sure there are other ways, but, as I said, it really depends on
your situation.

HTH,
F.O.R.
 
Back
Top