Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 3rd, 2005, 09:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default Scripting.FileSystemObject

Hi All,

I have a virtual directory in IIS called "Billing" and it points to
"D:\Billing" folder. It is outside of IIS drive.

If I try to open a PFD file in this folder, I can do it.
But I try to access a "Text" file to read it by using
"Scripting.FileSystemObject", it doesn't find the "Path" and gives an error. Here is my code;

<%
dim objFSO, objFileText, strPath, strLineText, strSourceFile

strSourceFile = "File1.txt"
strPath = "/Billing/" & strSourceFile

set objFSO = server.CreateObject("Scripting.FileSystemObject")
set objFileText = objFSO.OpenTextFile(strPath, 1, false)

' read one line at a time
do while not objFileText.AtEndOfStream
    strLineText = objFileText.readline

    response.Write strLineText
loop

set objFSO = nothing
set objFileText = nothing
%>

Thanks for your help,
:)

MCinar

Love all the creatures because of the creator.
__________________
MCinar

Love all the creatures because of the creator.
Reply With Quote
  #2 (permalink)  
Old April 3rd, 2005, 10:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post here the exact error that you see?

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #3 (permalink)  
Old April 4th, 2005, 08:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Happygv,

Here is the exact error;
"
Error Type:
Microsoft VBScript runtime (0x800A004C)
Path not found
/lettertemplates/mc_filescript_2.asp, line 8
"

Thanks for your help,


MCinar

Love all the creatures because of the creator.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FileSystemObject not available mega Classic ASP Professional 1 June 19th, 2006 11:25 AM
Need Help about FileSystemObject vbpratap VB.NET 0 March 3rd, 2006 06:40 AM
using Scripting.FileSystemObject under IIS 5.1 khinlau Classic ASP Basics 1 November 26th, 2005 09:18 AM
Using the FileSystemObject malhyp Dreamweaver (all versions) 1 October 2nd, 2005 08:00 AM



All times are GMT -4. The time now is 10:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.