Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Thread Tools Rate Thread Display Modes
Old 09-25-2014, 01:57 PM
secureus secureus is offline
Registered User
Join Date: Sep 2014
Posts: 14
VB Script to invoke SFXCL.exe

I am trying the samples of SFXCL Automation Tips. I happened to see the VB Script name : MinimalSFXCLUploadExample.vbs. Is it possible to share the VB Script file. I am trying to call sfxcl.exe from VB Script
Reply With Quote
Old 09-25-2014, 02:11 PM
rtb rtb is offline
VanDyke Technical Support
Join Date: Aug 2008
Posts: 4,305
Hi secureus,

Sure. Here is the code example:
' MinimalSFXCLUploadExample.vbs

' Generate a unique log file name
For Each item In GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select * from Win32_OperatingSystem")
    strLocalDateTime = item.LocalDateTime
strLogFile = "C:\Temp\SFXCL_LOG__" & Left(strLocalDateTime, 18) & ".txt"

' Launch SFXCL - Upload all .CSV files from local "Out" folder to remote "In" folder:
nResult = CreateObject("WScript.Shell").Run(_
    "SFXCL /NOPROMPT /RETRYCOUNT 0 /LOG """ & strLogFile & """ C:\Out\*.CSV  sftp://user:pass@", _
    0, _

' Check for failure
If nResult <> 0 Then
    WScript.Echo "Transfer Failure.  See " & strLogFile & " for details."
    WScript.Echo "Transfer Success."
End If

VanDyke Software
Technical Support
Reply With Quote

vbscript sfxcl

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 04:16 AM.