473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Alternatives to using Scripting.FileSystemObject

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
Jul 19 '05 #1
3 6769
Wayfarer wrote:
... 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?


did you ask the host admin/tech-support? seems they might be best placed to
explain what is/isn't available on their servers.

--
William Tasso - http://WilliamTasso.com
Jul 19 '05 #2
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

Jul 19 '05 #3
Thus spake William Tasso:
Wayfarer wrote:
... 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?


did you ask the host admin/tech-support? seems they might be best placed to
explain what is/isn't available on their servers.


I already tried that, thanks. Let's just say that they have proved less
than responsive, proving that you do in fact get what you pay for (like
I said, it's a freebie). I'm stuck with a freebie because I'm probably
going to lose my "production" site at brinkster.com because of lack of
funds. Emailing them (I even emailed their hostmaster listed under
whois) has been like casting words into a great black hole.

--
Wayfarer
Journeys: http://wayfarer.brinkster.net/contact.asp
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lin Ma | last post by:
Greetings, Is it possbile to check a file exist without using Server.CreateObject("Scripting.FileSystemObject") in asp page?? The reason is our hosting company turn that function off for...
3
by: bt | last post by:
I am just beginning with asp and have gotten an error that I need some help with. I posted a pair of files to an online ASP host server. The files are in the same directory; one is readfile.asp...
2
by: Stavros | last post by:
Hi all when I execute the following VB6 code in Windows 2000 and as an Administrator, everything is working fine. Project->References->"Microsoft Scripting Runtime" and scrrun.dll is located...
1
by: Sbroeff | last post by:
I would use the Scripting.FileSystemObject to find a file in a server, which I connect with a VPN connection. I'm not sure that the Scripting.FileSystemObject works with a folder, which is in...
5
by: VancouverMike | last post by:
Hi there, I am writing a web app using asp.net 1.1 and C#. This web app is launched in another win32 application and this app needs to pass information to my web app. But this win32 application...
3
by: ihsan.malik | last post by:
I need to check file size in input type=file before calling the submit method. Files can be of anytime and I want to make sure that size does not exceed from a certain limit. i have search a lot on...
1
by: pbd22 | last post by:
Hi - I have code that automatically fills tabs on a page. In some cases, a URL path won't be correct (the folder and files don't exist) and, in these cases, I want to catch these exceptions and...
1
by: ether | last post by:
Hi, I am using following function to check for a file on client it works for IE after setting browser security to low level but does not work for Firefox. please provide me information whether their...
7
by: Benjamins via AccessMonster.com | last post by:
Hi, I have meet a problem for CreateObject("Scripting.FileSystemObject"). I uses this code to get the information of the harddisk I have 10 user using the same code. All where working fine...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.