Jump to content


Photo

Launch Script after Transfers Complete


This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 JBC

JBC
  • Members
  • 3 posts

Posted 01 September 2011 - 04:58 PM

Hi again,

I was wondering if there was a way to launch a script after the jobs in the transfer queue have completed.

I am attempting to run a script after uploading the contents of a folder to a server. It would appear though, that TransferQueueOperation_OnEnd() is called after it adds the files from the folder into the queue. It does not wait for these files to be uploaded as one would expect. Is there an event I can use in my script that would activate once all files from this scheduled task have been successfully transferred?

Example:
Sub TransferQueueOperation_OnEnd()
  ScriptHost.Echo "OnEnd"
 
set Item = TransferQueueOperation.TransferQueueItem
set fso=CreateObject("Scripting.FileSystemObject")

call Item.LogWithCreate.Add(sfTransferQueueItemLogItemTypeInfo, "Sending Uploaded files to Archive")
fso.MoveFile "E:\FTPDownload\SmartFTP\Upload\*.csv", "E:\FTPDownload\SmartFTP\Upload\UploadArchive\"
call Item.LogWithCreate.Add(sfTransferQueueItemLogItemTypeInfo, "Move Operation Completed.")
End Sub

In the above example, it pops up "OnEnd" and then moves the files before they are even transferred to the remote server thus causing the transfer to fail as it can't find the local files.

Thanks again for your help.
JBC

Edited by JBC, 01 September 2011 - 05:15 PM.


#2 mb

mb

    Developer

  • Administrators
  • 11527 posts

Posted 01 September 2011 - 06:35 PM

Hello ..
The SDK is provided as is and support is not included in your license. Technical support is charged separably. Please contact the sales department for the conditions.