session log files

Advertisement

jmsmny
Joined:
Posts:
3

session log files

I'm using VBScript to automate an sftp process. I need help creating a session log file for each session. Thanks for your help.

sFTPScript = sFTPScript & "option echo on" & vbCRLF
sFTPScript = sFTPScript & "option batch on" & vbCRLF
sFTPScript = sFTPScript & "option confirm off"& vbCrLf
sFTPScript = sFTPScript & "option transfer binary" & vbCrLf
sFTPScript = sFTPScript & "open sftp://" & "userid" & ":" & "password" & "@" & "xx.xx.xxx.xxx" & " -privatekey=D:\Spool\VBControl\Policy_FTP\DPS_Oxford.ppk" & vbCrLf
sFTPScript = sFTPScript & "cd /Policies" & vbCrLf
sFTPScript = sFTPScript & "put " & fromFolder & "\*.pdf" & vbCRLF
sFTPScript = sFTPScript & "close" & vbCrLf
sFTPScript = sFTPScript & "exit" & vbCrLf

Set oFTPScript = oFTPScriptFSO.CreateTextFile(sFTPTempFile, True)
oFTPScript.WriteLine(sFTPScript)
oFTPScript.Close
Set oFTPScript = Nothing

sCmd = """C:\Program Files\WinSCP\WinSCP.com"" -script=" & sFTPTempFile
sError = oFTPScriptShell.run (sCmd, 0, true)

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum