x=inputbox("Enter String")
For i=1 to len(x) step 1 x=replace(x,mid(x,i,1),ucase(mid(x,i,1)))
Next
msgbox(x)
_____________________________
x=inputbox("Enter String")
For i=1 to len(x) step 1
y=mid(x,i,1)
k=ucase(y)
x=replace(x,y,k)
Next
msgbox(x)
For i=0 to 100 step 1 With browser ("title:=.*") With .page("title:=.*") x=.webelement("html tag:=SPAN","index:="&i).getroproperty("innertext") print(i&" "&x) End With End With
Next
'to find the files name and subfolders of a folder
Option explicit
Dim ohdd, ofo, osfs, n, s, osf, ofs, of, na, ns
'goto hdd
Set ohdd=createobject("scripting.filesystemobject")
'goto folder
Set ofo=ohdd.getfolder("F:\QTP")
'goto subfolder
Set osfs=ofo.subfolders
Set ofs=ofo.Files
For each of in ofs na=of.name ns=of.size ns=ns/1024 print(na&" size = "&ns&"KB")
Next
print ("------folders-----")
'get all folders names and size individually
For each osf in osfs
n=osf.name
s=osf.size
s=s/1024^2
print(n&" Size is ="&s&"MB")
Next
'destroy objects Set osf=nothing Set osfs=nothing Set ohdd=nothing
'VBSCRIPT to check memory of subfolders
Option explicit
Dim ohdd, ofo, osfs, n, s, osf 'goto hdd
Set ohdd=createobject("scripting.filesystemobject") 'goto folder
Set ofo=ohdd.getfolder("F:\QTP") 'goto subfolder
Set osfs=ofo.subfolders 'get all folders names and size individually
For each osf in osfs
n=osf.name
s=osf.size
s=s/1024^2
print(n&" Size is ="&s&"MB")
Next 'destroy objects Set osf=nothing Set osfs=nothing Set ohdd=nothing
'VBSCRIPT code to read particular in text file Option explicit Dim ohdd, otf, i 'connect to hard disk and open text file Set ohdd=createobject("scripting.filesystemobject") Set otf=ohdd.OpenTextFile("C:\Documents and Settings\Administrator\Desktop\11.txt") 'skip line until the required line For i=1 to 4 step 1 otf.SkipLine Next 'read particular line i=otf.ReadLine print(i) otf.Close 'destroy objects Set otf=nothing Set ohdd=nothing