DX Scripter Needed

Putting a saddle on the file system

Hi there. I am anything but new to DesktopX, but I have never scripted with it, and have little knowledge about VB Script. I wanted to build a theme that would display the sizes of various folders on my hard disk. I tried to do so, but got some flagrant error. Below is the code.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dim FSO
Dim res
Dim varFldr, varFldrSize

Set FSO = CreateObject("Scripting.FileSystemObject")

Dim varFolder
Set varFolder = FSO.GetFolder(varFldr) <======Error happens here
varFldrSize = Round(varFolder.size/1048576, 2)

Archive Size Info.text=varFldrSize
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Any help? I would really appreciate anything that you guys have to offer.
2,798 views 5 replies
Reply #1 Top
I am actually about to release an object just like that. You are welcome to take a look at my code once it is released.

In the meantime, try:
varFldr = "C:\windows\system32"
Set varFolder = fso.GetFolder(varFldr)
Reply #2 Top
Well, ironically that worked like a charm. As long as I have someones attention, is there a way to periodically ping an ip to see if a server is up? Again, extreme noobage here.
Reply #3 Top
Dim pingResult
Object.SetTimer 5555, 6000 'ping every 6 seconds

Sub Object_OnTimer5555
If System.InternetConnected = True Then
pingResult = System.Ping("www.wincustomize.com")
Object.Text = pingResult
Else
Object.Text = "No internet connection"
End Sub
Reply #5 Top
reindeer057 is right. It's pretty slick too