Jump to content


Calling external VBScript from Transfer Queue

vbscript external script transfer queue scripting

  • Please log in to reply
No replies to this topic

#1 OozleFinch

  • Members
  • 2 posts

Posted 13 September 2012 - 01:05 AM

Hi all,

I'm running into an issue while trying to run a VBscript during a download from a remote server.

I've setup a Scheduler, assigned multiple queue items, and assigned a script to the very last item. The script itself is just a bare-bones, 'will it work?' kind of script straight off of the SmartFTP website. And it runs fine. However, I need to do a little more and actually kick-off yet another script.

Here is the code I am trying to run:
Sub TransferQueueOperation_onend()
ScriptHost.Echo "onend Result = " & TransferQueueOperation.Result

Set wShell = CreateObject("WScript.Shell")
wShell.Run "C:\DATA\US\BLS\FTP - File Ingest and Import v1.1.vbs", 0, False
End Sub

It runs fine up until the point I try to call native VBscript methods. It gets to the "ScriptHost.Echo...." portion, echoes the value just fine, and then errors out on the "Set wShell..." portion. The script that I am trying to call runs just fine on its own. I checked the log for the Transfer Queue item and here is what it shows:
[20:28:40] Script: C:\Documents and Settings\Bob\Desktop\test.vbs
[20:28:40] Line: 18
[20:28:40] Char: 4
[20:28:40] Error:
[20:28:40] Code: 0x80070002
[20:28:40] Source:

Line 18 represents the "Set wShell...." portion of what I added in. I'm suspecting that I need to create an object to access VBscript methods?

Any help or examples are gratefully appreciated!

On a side, note I accidentally created a thread under the FTPLib section.... its the same as this one.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users