473,856 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scripting.FileS ystemObject problems

If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
Dim objTextStream
const strFileName = "F:\FileShare\r esume.txt"
const fsoForReading = 1
If objFSO.FileExis ts("F:\FileShar e\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenText File(strFileNam e, fsoForReading)
#2
Response.Write "" & objTextStream.R eadAll & ""
#3
objTextStream.C lose
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP
Jul 19 '05 #1
3 7176
Use something less intrusive than Norton.
http://www.aspfaq.com/2180

"PB4FUN" <th*********@do esnot.exist> wrote in message
news:#m******** ******@TK2MSFTN GP10.phx.gbl...
If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
Dim objTextStream
const strFileName = "F:\FileShare\r esume.txt"
const fsoForReading = 1
If objFSO.FileExis ts("F:\FileShar e\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenText File(strFileNam e, fsoForReading) #2
Response.Write "" & objTextStream.R eadAll & ""
#3
objTextStream.C lose
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP

Jul 19 '05 #2
Maybe this.
http://www.aspfaq.com/2180

Ray at home

"PB4FUN" <th*********@do esnot.exist> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
the page hangs.

<%
Dim objFSO
Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")

Jul 19 '05 #3
Thanx, it works !!!!

Meindert, MCP

"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
Use something less intrusive than Norton.
http://www.aspfaq.com/2180

"PB4FUN" <th*********@do esnot.exist> wrote in message
news:#m******** ******@TK2MSFTN GP10.phx.gbl...
If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
Dim objTextStream
const strFileName = "F:\FileShare\r esume.txt"
const fsoForReading = 1
If objFSO.FileExis ts("F:\FileShar e\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenText File(strFileNam e,

fsoForReading)
#2
Response.Write "" & objTextStream.R eadAll & ""
#3
objTextStream.C lose
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP


Jul 19 '05 #4

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

Similar topics

2
3444
by: MeAndI | last post by:
I've some problems with "Scripting.FileSystemObject" object If I try to create a new text file with the function myfile.CreateTextFile I have two differents result: If I execute the script client-side there are no problems, but if I execute the script server-side the process stops when I call this function (I think that the process is in loop because I must close iexplore to stop the application). Any thoughts?
2
2822
by: Fedroz | last post by:
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("Scripting.FileSystemObject")
2
2325
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
5641
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
1
13808
by: Astra | last post by:
Hi All Was running my ASP app no problem on a Windows XP Pro SP2 machine with IIS, dragged a copy my app folder and put it on another Windows XP Pro SP2 machine with IIS and I get the below problem: Error Type: Microsoft VBScript runtime (0x800A01AD) ActiveX component can't create object: 'Scripting.FileSystemObject' /asp/forms.asp, line 497
5
5202
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 doesn't support long string(Maximum 255), which gives me problem passing information longer than 255 through querystring. So I have to use an intermedia plain file and in my web app, using Scripting.FileSystemObject to open the file and read the...
1
8362
by: hugobotha | last post by:
Hi All, I have a problem when saving a text file as a html file in unicode and then google index the Unicode bom as well as I can not open these files. I have a asp page that takes another asp template page and suck some data out of a database, I then create a text file, put this information in there and then save it as a text file except that I change the extenstion to htm. Basically I create a html file using asp and then save it. ...
7
8867
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
5163
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
9762
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
11056
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
10696
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
10782
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
10384
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7932
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
7093
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();...
0
5958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3201
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.