473,780 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in scripting with FileSystemObjec t.

Hi!

Here is my problem:
I'm trying a simple script copied by MSDN for read a text
file and put the content on output web page!
I use the following code:

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("S cripting.FileSy stemObject")
Set f = fso.OpenTextFil e("c:\testfile. txt", ForReading)
response.write f.readAll()
f.Close
Set fso = nothing
Set f = nothing
It happens that the server goes in loop on the method
OpenTextFile.
The object FileSystemObjec t (fso) was correctly instanced,
but on the method fso.OpenTextFil e the system begin an
infinite loop!!!

So i tryed to reistall the scripting module downloading
from http://www.microsoft.com/downloads/...&DisplayLang=en

Once I've reistalled the .exe from Microsoft, and
resterted the server, all goes WELL!!!!
Marvellous!!!
But everytime I've to reinstall the scripting module and
restart the machine!!!!
(My configuration: w2k SP4 in English, Internet Explorer
6.0 sp1 IIS 5.0)

Any idea?

Thx!
Fedroz
Jul 19 '05 #1
2 2819
I believe you might be experiencing the Norton problem. Have a look at
http://www.aspfaq.com/show.asp?id=2180 ...

"Fedroz" <fe************ ***********@hot mail.com> wrote in message
news:08******** *************** *****@phx.gbl.. .
Hi!

Here is my problem:
I'm trying a simple script copied by MSDN for read a text
file and put the content on output web page!
I use the following code:

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("S cripting.FileSy stemObject")
Set f = fso.OpenTextFil e("c:\testfile. txt", ForReading)
response.write f.readAll()
f.Close
Set fso = nothing
Set f = nothing
It happens that the server goes in loop on the method
OpenTextFile.
The object FileSystemObjec t (fso) was correctly instanced,
but on the method fso.OpenTextFil e the system begin an
infinite loop!!!

So i tryed to reistall the scripting module downloading
from http://www.microsoft.com/downloads/...&DisplayLang=en

Once I've reistalled the .exe from Microsoft, and
resterted the server, all goes WELL!!!!
Marvellous!!!
But everytime I've to reinstall the scripting module and
restart the machine!!!!
(My configuration: w2k SP4 in English, Internet Explorer
6.0 sp1 IIS 5.0)

Any idea?

Thx!
Fedroz

Jul 19 '05 #2


So i tryed to reistall the scripting module downloading
from http://www.microsoft.com/downloads/...&DisplayLang=en


The url doesn't work...
Where can i find the scripting module?

thx

d.
Jul 19 '05 #3

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

Similar topics

2
1875
by: sb | last post by:
I'm trying to come up with a simple script to iterate through a bunch of images in a directory and delete the ones that haven't been viewed in x number of months. I thought "DateLastAccessed" would be the way to go but it seems to have a rather strict interpretation of what consists of "access" If I view a file, has it not been "accessed"? Not according to my script. No matter how many times I view an image, the value stays the same... ...
9
9804
by: Ed | last post by:
Is there any known issue with the use of "Scripting.FileSystemObject"? Here's a snippet of my code to obtain the filesize of a file Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.Getfile(strFileSpec) lngFileSize = f.size Set fso = Nothing This used to work perfectly. But with the grown of files (now more than
2
2317
by: John | last post by:
Can't get this to work. I'm creating a workaround for the absence of aspJPEG on my server. I'm using aspUpload but my server only uses aspThumb. After aspThumb optimizes the original pic the file size changes and I need to reflect that change. When using aspUpload I can reference it's built in File object references but they only refer to the "original" file. There's an easy solution when using aspJPEG but not with aspThumb so I'm...
1
5634
by: andrewcw | last post by:
I have used System.Management in the past to extract and walk thru drives & check their type. I can also do it with COM's FileSystemObject. Here I am trying to just use the Management Object after using the Directory class... There seems to be a way to load the System Management Object with string path ( 8 overloads ), but every time I try a variation it crashes. Any ideas ? Thanks Scripting.FileSystemObject FSO = new
0
925
by: bobsab | last post by:
Hi all, My application uses ASP and several COM objects. The communication between ASP and the COMs works perfectly, and I have no errors when I call "Server.CreateObject" from ASP. The problem lies in specifically one of my COMs. What I am trying to do is transform my COMs from VB6 to .NET. So far it has been going well. I managed to do most of them. One of my .NET COMs, COMTasks, has a function that calls another function in a COM called...
7
8854
ADezii
by: ADezii | last post by:
The next series of Tips will involve the Microsoft Scripting Runtime Library (Scrrun.dll). This Library is, in my humble opinion, one of the most useful and practical Libraries ever created. With the Scripting Runtime Library, you can retrieve information related to Drives, Folders, Files, and Text Files and set/retrieve certain Attributes of Drives, Folders, Files, and Text Files. Through Methods exposed by this Library, you can also manipulate...
0
5159
ADezii
by: ADezii | last post by:
This is the 2nd Tip in a series of Tips on the Microsoft Scripting Runtime Library. The 1st Tip related to Drives, while this Tip will concentrate on the Folders (Directories) in your PC and various methods to retrieve information from and how to manipulate them. The code should be self explanatory and basically documents itself. Should there be any questions related to this Topic, please feel free to ask. 'Accessing Folder Properties Dim...
0
5423
ADezii
by: ADezii | last post by:
This is the 3rd in a series of Tips dealing specifically with the Microsoft Scripting Runtime Library. In this Tip, we'll show you how to return specific Properties relating to Files, as well as various Methods to Copy, Move, and Delete them. The code is self explanatory, so I'll jump right in: Dim fso As FileSystemObject, fil As File 'Set fso = New Scripting.FileSystemObject OR Set fso = CreateObject("Scripting.FileSystemObject") ...
0
4466
ADezii
by: ADezii | last post by:
This is the last in a series of Tips involving the Microsoft Scripting Runtime Library and deals with creating, opening, writing to, reading from, and closing Text Files via this Library. At this time, the Scripting Library cannot deal with the opening and manipulation of Files in Binary Mode, so we will only demonstrate this functionality as it relates to Text Files. The code is fairly straightforward and sparsely commented, so I will not bore...
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.