Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log Files

Status
Not open for further replies.

lpb71

Technical User
Joined
Mar 10, 2004
Messages
57
Location
GB
How can I get my script below to write to a log file so I can look what it is doing. I have tried using the > redirect at the end of my sh.run line, but this doesnt seem to work.

' Script to replicate data server to external usb device
'

' Capture branch number
do
branchid = InputBox("Enter Branch Number (with leading 0s)")
if len(branchid)=3 then exit do
msgbox "Branch id needs to be 3 numbers with leading 0', please re-enter branchid"
loop

ysno = MsgBox ("Please confirm details, branch=" & (branchid) & ", Select OK to Continue or Cancel tio Quit" ,vbOKCancel)
If ysno = 2 Then WScript.Quit

set sh= wscript.createobject ("wscript.shell")
sh.run("lrep_reader -p snapvault_start -f cipfas270.cip. -q /vol/vol3/br" + (branchid) + " -o " + (branchid) + "@0 " + (branchid) + " + "/data")



 
You may try something like this:
sh.run "[!]cmd /c [/!]lrep_reader ... [!]> \path\to\file.log[/!]"


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top