adsense


Showing posts with label ADVANCE VB SCRIPT FILES. Show all posts
Showing posts with label ADVANCE VB SCRIPT FILES. Show all posts

Thursday, 12 November 2015

ADVANCE VB SCRIPT FILES PAGE 108

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button




ADVANCE VB SCRIPT FILES





Files


 
Files is a collection, which provides a list of all files contained within a folder. 
Properties 

• Count 

 

• Item 

Example 
<!DOCTYPE html> 
<html> 
<body> 
<scrip 
t language="vbscript" type="text/vbscript"> 
 
   Dim fso, f, f1, fc, s 
   Set oFS = CreateObject("Scripting.FileSystemObject") 
    
   'get the folder by giving its path 
   Set f = oFS.GetFolder("D:\PROJECT\") 
   Set fc = f.Files 
    
   'Get Item 
   Set s = fc.Item("sendmail.vbs") 
    
   'Get Count 
   x = fc.Count 
    
   Document.write s 
   Document.write x 
 
</script> 
</body> 
</html> 
If the above script is saved as HTML and executed in IE, 
we would get the following output in the console. 
D:\PROJECT\sendmail.vbs 
6