In my scenario, users are able to upload zip files to a.example.com
I would love to create a "daemon" which in specified time intervals will move-transfer any zip files uploaded by the users from a.example.com
to b.example.com
From the info i gathered so far,
So the question is how could i implement step 3?
b.example.com
?b.example.com
?No i am not asking for the full code, i just can figure out, how could i perform reading and writing on the fly, without user interaction.
I mean i could download the file locally from a.example.com
and upload it at b.example.com
but that is not the point.
To transfer files between 2 Windows servers, the traditional way is to use FTP desktop app as a middle-man. You need to download Filezilla or other FTP desktop tool, configure and use it to upload or download files between two remote servers.
Therefore, you can use an FTP connection to share files among two Windows Servers. Also, the SCP command is another way to transfer the files among two Windows Servers. But, the best method for file transfer is by using file transfer software that is EaseUS Todo PCTrans Technician File Transfer Software.
Here is another solution:
HttpWebRequest
Links:
Problems you gotto solve:
How to determine which files to upload to server B. I would use Directory.GetFiles
in a Timer
to find new files instead of using a FileSystemWatcher
. You need to be able to check if a file have been uploaded previously (delete it, rename it, check DB or whatever suits your needs).
Authentication on server B, so that only you can upload files to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With