hschir Posted April 3, 2012 Share Posted April 3, 2012 Hi, I know there's a post about this somewhere else - but as I have a solution (that doesn't cost a cent) - I thought I'd share it with all you nice folks. I'm using a sequence in DAQFactory to save my daily log files in a particular local folder and start a new log file each night at midnight. Though I've tried all sorts of things from DAQFactory sequences to Java programs to send the name of the previous day's log file name to a batch file etc etc for uploading to a remote site using sftp, nothing really seemed satisfactory, Until... I found hidden away in the documentation for the freeware sftp program I'm using, WinSCP, a command to synchronize a local folders contents and that of the remote one - in real time. All that is needed is a batch file to call the WinSCP script, both contained in the local log file directory and to envoke the batch and the script will run in the background reflecting any log file changes - including the current one whenever DAQFactory has written to it. Here's the batch file code (name it whatever youi like): winscp.com /script=WinSCP_Synchronize_Script.txt[/CODE]And here's the WinSCP script code (name it "WinSCP_Synchronize_Script.txt"):[CODE]# WinSCP sychronize local and remote folders# keep remote folder uptodate# H Schiretz April 2012# Automatically abort script on errorsoption batch abort# Disable overwrite confirmations that conflict with the previousoption confirm off# Connect using a passwordopen sftp://yourusername:?yourpassword@yourserver.com -hostkey="<fingerprint>"# keepuptodate The local directory and the remote directorykeepuptodate c:\Users\hschiret\Documents\UNE_MonoEvap_Project\Log_Files public_html/Field_Logs[/CODE] Link to comment Share on other sites More sharing options...
andrewjfox Posted April 3, 2012 Share Posted April 3, 2012 Another good SFTP solution is CoreFTP Client LE and mini SFTP server (both free). www.coreftp.com The mini server is simple to setup and use and works well (I've tested using Filezilla as client). Andrew Link to comment Share on other sites More sharing options...
hschir Posted April 3, 2012 Author Share Posted April 3, 2012 Thanks Andrew but I think you can only do what I'm doing with the pro version and it's not free ! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.