From: bob123 on 14 Jul 2010 05:06 Hi, I try to test a list of databases nothing in liste.out Can you help me ? Dim fso, infile, aNames, sBase, shell set fso = createobject("scripting.filesystemobject") set infile = fso.opentextfile("liste.txt",1) Set shell = WScript.CreateObject("WScript.Shell") aNames = Split(infile.readall, vbnewline) infile.close for each sBase in aNames wsh.echo "Base:", sBase shell.Run "tnsping sBase >> liste.out" Next
From: Pegasus [MVP] on 14 Jul 2010 05:30 "bob123" <bob123(a)gmail.com> wrote in message news:4c3d7e10$0$10071$426a74cc(a)news.free.fr... > Hi, > > I try to test a list of databases > nothing in liste.out > > Can you help me ? > > Dim fso, infile, aNames, sBase, shell > set fso = createobject("scripting.filesystemobject") > set infile = fso.opentextfile("liste.txt",1) > Set shell = WScript.CreateObject("WScript.Shell") > > aNames = Split(infile.readall, vbnewline) > infile.close > > for each sBase in aNames > wsh.echo "Base:", sBase > shell.Run "tnsping sBase >> liste.out" > Next Redirecting console output is a property of cmd.exe. Your executable tnsping.exe (if this is the correct name) cannot do it. You need to use something like shell.Run "cmd.exe /c tnsping.exe sBase >> liste.out"
From: bob123 on 14 Jul 2010 06:03 >> >> Dim fso, infile, aNames, sBase, shell >> set fso = createobject("scripting.filesystemobject") >> set infile = fso.opentextfile("liste.txt",1) >> Set shell = WScript.CreateObject("WScript.Shell") >> >> aNames = Split(infile.readall, vbnewline) >> infile.close >> >> for each sBase in aNames >> wsh.echo "Base:", sBase >> shell.Run "tnsping sBase >> liste.out" >> Next > > Redirecting console output is a property of cmd.exe. Your executable > tnsping.exe (if this is the correct name) cannot do it. You need to use > something like > > shell.Run "cmd.exe /c tnsping.exe sBase >> liste.out" OK thanks I think I missed something sBase is not replaced by his value, no ? can you help me ? Thanks again
From: Pegasus [MVP] on 14 Jul 2010 07:10 "bob123" <bob123(a)gmail.com> wrote in message news:4c3d8b69$0$10807$426a74cc(a)news.free.fr... >>> >>> Dim fso, infile, aNames, sBase, shell >>> set fso = createobject("scripting.filesystemobject") >>> set infile = fso.opentextfile("liste.txt",1) >>> Set shell = WScript.CreateObject("WScript.Shell") >>> >>> aNames = Split(infile.readall, vbnewline) >>> infile.close >>> >>> for each sBase in aNames >>> wsh.echo "Base:", sBase >>> shell.Run "tnsping sBase >> liste.out" >>> Next >> >> Redirecting console output is a property of cmd.exe. Your executable >> tnsping.exe (if this is the correct name) cannot do it. You need to use >> something like >> >> shell.Run "cmd.exe /c tnsping.exe sBase >> liste.out" > > OK thanks > I think I missed something > sBase is not replaced by his value, no ? > can you help me ? > Thanks again Sorry, I cannot understand your question - please rephrase.
From: bob123 on 14 Jul 2010 08:21 >>> >>> Redirecting console output is a property of cmd.exe. Your executable >>> tnsping.exe (if this is the correct name) cannot do it. You need to use >>> something like >>> >>> shell.Run "cmd.exe /c tnsping.exe sBase >> liste.out" >> >> OK thanks >> I think I missed something >> sBase is not replaced by his value, no ? >> can you help me ? >> Thanks again > > Sorry, I cannot understand your question - please rephrase. OK, I try to explain me Sorry if I am not clear I got an error as if tnsping doesn't understand sBase so I wondered if sBase was replaced by his value Thanks
|
Next
|
Last
Pages: 1 2 Prev: Simple hack to get $500 to your home. Next: Simple Hack To Get $2000 To Your PayPal Account |