What don't you like about the FSO? You could try playing with stdOut
property of the Exec object. (I ~think~ this requires WSH 5.6.). Here's a
sample that may get you started unless I screwed it up, in which case, it'll
just be confusing.
Dim oShell
Dim sPath, sFilename
sPath = "C:\Path\"
sFilename = "file.txt"
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec("cmd.exe /c for /f ""tokens=*"" %j in ('dir " &
sPath & sFilename & " /t:a^|find ""/""') do echo %j")
Do While Not oExec.stdOut.AtEndOfStream
sOut = sOut & oExec.StdOut.Read(1)
Loop
Set oExec = Nothing
Set oShell = NOthing
sOut = Replace(sOut, vbCrLf, "|")
aOut = Split(sOut, "|")
If UBound(aOut) > 1 Then sOut = Trim(aOut(2))
sOut = Left(sOut, Len(sOut) - Len(sFilename))
Do while instr(sOut, " ") > 0
sOut = Replace(sOut, " ", " ")
Loop
Dim aProps(2)
aProps(0) = Mid(sOut, 1, Len("MM/DD/YYYY")) 'date modified
aProps(1) = Trim(Mid(sOut, Len("MM/DD/YYYY "), Len("00:00 XM")))
aProps(2) = Right(sOut, Len(sOut) - Len(aProps(0) & aProps(1) & " "))
sResult = "Last modified: " & aProps(0) & " " & aProps(1) & "<br>"
sResult = sResult & "Size (bytes): " & aProps(2)
Response.Write sResult
Ray at home
"Wayfarer" <my*******@bottom.com> wrote in message
news:MP************************@news2.joimail.com. ..
Hi,
I've got a freebie hosting mirror of my production personal website
(sounds kinda grandiose, doesn't it?) at http://journeys.webhostme.com/.
At the production website I was using Scripting.FileSystemObject to get
the date that the file was last modified and to read/write a counter
text file for the number of hits that the whole site had. The freebie
has a kind of half-ass*d FileSystemObject, but it has no GetFile method.
Is there any way I can accomplish the same things without using the
FileSystemObject, or by using the crippled one?
TIA
--
Wayfarer
Journeys: http://wayfarer.brinkster.net/contact.asp