Hi,
I am using the VB script to pump the couple of transactions into A
folder to B folder.
I can call this .VBS file in Windows scheduler and it will run on
specific timings.
Now i want to do this thru Load Runner than Windows scheduler.
I tried to keep the vb script in LR VB Script Vuser Protocol and ran
it, but i am getting some errors..
This is the script i am using for general Pumping which working in
WIndows scheduler and not working in LR VBSCRIPT VUSER.
Action()
{
set fso = wscript.createobject("scripting.filesystemobject")
set ls = wscript.createobject("scripting.filesystemobject")
set ws = wscript.createobject("wscript.shell")
randomize(Timer)
Dim runflag
Dim newfilename
Dim filectr
Dim fname
Dim mypos
Dim rfname
runflag = true
filectr = 0
Set f = fso.GetFolder("C:\Documents and Settings\Desktop\A")
Set t = ls.OpenTextFile("C:\Documents and Settings\Desktop\Logs\A.txt",
8, true, TristateFalse)
t.WriteLine (Date & " " & Time & " ----- Transactions Start -----")
Set fs = f.Files
On Error Resume Next
For each fl in fs
fname =
fl.name
rfname = Right(fname, 3)
if rfname = "278" or rfname = "txt" or rfname = ".in" Then
t.WriteLine("pumptxn -p9082 127.0.0.1 " & fname)
ws.Run("pumptxn -p9082 127.0.0.1 " & fname)
Wscript.Sleep(1000) 'every 1 seconds
fl.Move("C:\Documents and Settings\Desktop\B\" & fname)
't.WriteLine("File " & fname & " moved to destop\B")
end if
Next
t.WriteLine(Date & " " & Time & " ----- processed transactions
-----")
t.WriteBlankLines 2
t.Close
set ls = nothing
set fso = nothing
set ws = nothing
wscript.Quit
return 0;
}
Error: Error: Error : Action.vbs (12) : column 0 : Object required:
'wscript' , err # = 424
Does any one suggest me here please.
Thanks,