want to auto transfer text files to remote computer

scaryfast

Member
Jul 3, 2008
97
0
0
I would like to use the internet to connect 2 computers. (Windows)

I want to transfer a text file stored on computer 1 to computer 2 at random times without human intervention.

What would be the best strategy for this? I could use c++ or perl if needed. Or, if there is already free or low cost software designed for this purpose that would be great! Maybe I could use a combination of these ideas?

Am I at the right forum for this topic, or should I seek a different forum?

Thanks.
:)
 
Last edited:

scaryfast

Member
Jul 3, 2008
97
0
0
Thank You!

RSync seems like it would be great if I can get it to work securely between 2 Windows machines.

Which forum would be best for discussing the details of how to accomplish this?
 

gsellis

Diamond Member
Dec 4, 2003
6,061
0
0
SFTP or FTPS would be another. The ftp server would need a public IP. I think FileZilla supports a secure method and could be your ftp server (you can Get from the destination or put from the source). A script or for a less random method, you can use Windows Task Scheduler or both (a script can be used to run a task on demand).
 

scaryfast

Member
Jul 3, 2008
97
0
0
Thank You for the further suggestions.

Seems this is crazy hard to do on Windows Vista Machines.

The computer with the original file needs to periodically send the file to the other computer, without the client asking for it.

Am hoping to get this to work within a perl or C++ console application.

There are no perl modules that would work with SFTP/SSH2 on windows; as far as I can tell.

I'm not sure that FTPS/TLS is secure enough. I have not researched it enough to know whether it would be good for my purposes.

Cygwin and Rsync with OpenSSH seems like they might not work well within a command window. Perhaps I can get them to work as a "Cygwin batch file"(or something) that gets called occasionally.

I don't really want to set up the computer that sends the file as a server, although you could, I suppose, call it a server when it puts the file!


Please, continue to point me in the right directions!
 

seepy83

Platinum Member
Nov 12, 2003
2,132
3
71
FTPS should provide sufficient security for the data transmission...it supports AES encryption.

How are you defining the "random times without human intervention" that you want the files to transfer?

You might be able to make life easy for yourself by setting up the receiving end as an FTPS server and have the sending side run a script to transfer the files at a given interval (every 15 minutes, 30 minutes, hour, whatever...). Personally, I've been using WinSCP scripts for file transfers like this.

On the other hand, if you really need to a a real-time sync whenever a life changes, then you'll need to go down another path.
 

scaryfast

Member
Jul 3, 2008
97
0
0
Appreciate all the help.

The intervals will either be every 15 seconds or times of file change; perhaps between 10 seconds and 30 minutes.

I'm thinking that this would be best in a window that constantly ran. However, I envision that I could repeatedly call a batch file to run a script if I couldn't schedule it directly.

It is starting to make sense that the receiving computer is the server.
 

seepy83

Platinum Member
Nov 12, 2003
2,132
3
71
Wow...every 15 seconds. Are you overwriting files or appending to them? How will you handle transmission failures/errors? What if the WAN link goes down? What if the current transmission takes more that 15 seconds to complete, and your scheduled script or executable is already calling for another transfer to begin? I don't know what kind of data you're dealing with, how critical it is, etc., but I guess my point is that I hope you've thought through all of the things that can go wrong and your automated process has a way of handling them so that you don't end up with garbage data or lost data on either side.

Depending on whether or not you have a budget, you might want to look into purchasing some commercial/off the shelf software that can handle this.
 

scaryfast

Member
Jul 3, 2008
97
0
0
It is non-critical in terms of errors. I'll live with failures. However, I still want it secure. It does need to be free.
 
Last edited:

gsellis

Diamond Member
Dec 4, 2003
6,061
0
0
Also try another tactic... Encrypt before you transfer. Then you can do an easy transfer and all the hardwork at the endpoints.
 

seepy83

Platinum Member
Nov 12, 2003
2,132
3
71
Also try another tactic... Encrypt before you transfer. Then you can do an easy transfer and all the hardwork at the endpoints.

If it's really sensitive data, I would actually recommend encryption of the file and encryption at the transport layer.

Using a secure protocol to encrypt the transmission really isn't difficult. The initial configuration of the two endpoints and any scripts used to automate the task just need to be done correctly during the initial setup. After you get that completed, it's really exactly the same as using a non-secure protocol to send the files.