lauraSatellite
Technical User
Hi,
I have the following .vbs file:
'=====================Get Current Folder Location
Set sh = CreateObject("WScript.Shell")
currentLocation = sh.CurrentDirectory
Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
DisplayInterface
'=====================Internet Explorer Window
Sub DisplayInterface()
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 1
objExplorer.Width=800
objExplorer.Height = 550
objExplorer.Left = 0
objExplorer.Top = 0
Do While (objExplorer.Busy)
Wscript.Sleep 200
Loop
objExplorer.Visible = 1
objExplorer.Document.Body.InnerHTML = FunctionGetFolders(currentLocation)
End Sub
'=====================Retrieve List of Folders in folderspec
Function FunctionGetFolders(folderspec)
Dim fs, f, f1, s, sf
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set sf = f.SubFolders
For Each f1 in sf
s = s & f1.name & "<P>"
Next
FunctionGetFolders = s
End Function
This results in the folders in folderspec being listed on the html page.
I want to turn the items in this list into <a href>'s to the named folder. It sounds simple but i am having difficulty with it. If anyone knows what syntax i should be using please let me know.
i googled this but was unable to come up with an appropriate answer with what i found.
Any help would be greatly appreciated.
I have the following .vbs file:
'=====================Get Current Folder Location
Set sh = CreateObject("WScript.Shell")
currentLocation = sh.CurrentDirectory
Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
DisplayInterface
'=====================Internet Explorer Window
Sub DisplayInterface()
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 1
objExplorer.Width=800
objExplorer.Height = 550
objExplorer.Left = 0
objExplorer.Top = 0
Do While (objExplorer.Busy)
Wscript.Sleep 200
Loop
objExplorer.Visible = 1
objExplorer.Document.Body.InnerHTML = FunctionGetFolders(currentLocation)
End Sub
'=====================Retrieve List of Folders in folderspec
Function FunctionGetFolders(folderspec)
Dim fs, f, f1, s, sf
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set sf = f.SubFolders
For Each f1 in sf
s = s & f1.name & "<P>"
Next
FunctionGetFolders = s
End Function
This results in the folders in folderspec being listed on the html page.
I want to turn the items in this list into <a href>'s to the named folder. It sounds simple but i am having difficulty with it. If anyone knows what syntax i should be using please let me know.
i googled this but was unable to come up with an appropriate answer with what i found.
Any help would be greatly appreciated.