Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-23-2005, 06:53 AM
matt131 matt131 is offline
Registered User
 
Join Date: Mar 2005
Posts: 21
Question Scripting SecureFX

Can you run SecureFX with a script similar to SecureCRT? I'm trying to find a good way to automaticlay move files around and capture the transfer information in logs for review if something goes wrong. Id like to pass all the needed information as parms to the script for connecting and moving the files.

Currently I'm doing this using batch files and OpenSSH. I use the sftp command and pass it a command file that contains the commands I need it to carry out (put, get, ls, cd, etc). This is working fine but I am not able to capture an error condition if the put or get step fails.

Any information would be greatly appreciated.
Thanks!
Reply With Quote
  #2  
Old 03-23-2005, 12:25 PM
doucette doucette is offline
Registered User
 
Join Date: Sep 2004
Posts: 19
re

I second that motion
Reply With Quote
  #3  
Old 04-05-2005, 08:40 AM
wasodg2 wasodg2 is offline
Registered User
 
Join Date: Dec 2004
Location: Spokane, WAshington
Posts: 16
You could try the EXEC method from within vbScript, it has the capability to capture output from the command line. Kind of like the following example with the ping command.

StrComputer = "PlaceComputerNameHere"
Set Shell = CreateObject("WScript.Shell")
Set objScriptExec = Shell.Exec("ping -n 1 -l 5 -w 1000 " & strComputer)
Do While Not objscriptexec.Stdout.AtEndOfStream
str = objscriptexec.Stdout.ReadLine
If InStr(str, "timed out") Then
WScript.Echo StrComputer & " not responding"
End If
If InStr(str, "Reply from") Then
WScript.Echo StrComputer & " Computer On Line"
End If
Loop
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 02:16 AM.