Created
January 6, 2012 00:48
-
-
Save mlhaufe/1568244 to your computer and use it in GitHub Desktop.
Getting html details (VBScript)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Reference: <http://www.visualbasicscript.com/tm.aspx?high=&m=95638&mpage=1> | |
Option Explicit | |
Dim fso : Set fso = CreateObject("Scripting.FileSystemObject") | |
Dim files : Set files = fso.GetFolder("C:\test\").Files | |
Dim file | |
For Each file In files | |
If file.Type = "Firefox Document" Then '<-- update for your system | |
Dim doc : Set doc = CreateObject("htmlfile") | |
doc.write fso.OpenTextFile(file.Path).ReadAll() | |
WScript.Echo doc.title | |
doc.title = doc.title & " (Modified)" | |
WScript.Echo doc.documentElement.outerHTML | |
End If | |
Next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mlhaufe:thanks for your help ,i just make a test .the result:in win7+IE10,or in 2012+,my code run all in well.