Hello
I have a script that executes the synchronize command to sync up a folder. I have been tinkering with it over 2 weeks changing timeout values and stuff and the script consistently will download all the small files, but fails at 99% when downloading the Large file (67 GB). If I do not manually delete the incomplete large file it will skip it the next to the script runs.
Here is my script
// Configuration
// Session to connect to
var SESSION = "";
// Path to winscp.com
var WINSCP = "C:\\WinSCP\\winscp.com";
var filesys = WScript.CreateObject("Scripting.FileSystemObject");
var shell = WScript.CreateObject("WScript.Shell");
var logfilepath = filesys.GetSpecialFolder(2) + "\\" + filesys.GetTempName() + ".xml";
var exec;
// run winscp to sync folders
exec = shell.Exec("\"" + WINSCP + "\" /log=\"" + logfilepath + "\"");
exec.StdIn.Write(
"option batch abort\n" +
"open \"" + SESSION + "\"\n" +
"synchronize local -delete c:\localfolder /hostfolder \n" +
"exit\n");
// wait until the script finishes
while (!exec.StdOut.AtEndOfStream)
{
WScript.Echo(exec.StdOut.ReadAll());
}
if (exec.ExitCode != 0)
{
WScript.Echo("Error downloading " + filenameLatest);
WScript.Quit(1);
}
This is the output I am getting on the transfer for that file
'/hostfolder' Synchronizing... Local 'C:localfolder' <= Remote '/hostfolder' bigfile.bigfile | 64756707 KiB | 70.8 KiB/s | binary | 99% Lost connection. 12-29-12 07:48PM
I have other scripts that pull larger files down using a modified version of this script
https://winscp.net/eng/docs/script_download_most_recent_file
I would like to keep using synchronize though because the folders contents are constantly changing and writing a script to synchronize it would be a pain.
Here is the information for the Host and Client
Host
------
IIS7 FTP
Windows Server 2008 R2
Client
-------
Windows Server 2008 R2
WinSCP version 5.1.2 (Build 2816) portable
File protocol: FTP
Encryption: SSL/TLS Implicit encryption
Connection: passive mode
Timeouts: 200 seconds
Keep Alives: Executing Dummy... 31 second (originally was off, turning it on didnt change anything)[/list][/code]