Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemObjects

Status
Not open for further replies.

Danielvb

Programmer
Oct 8, 2002
34
US
Hello programmers:

Please I need your help. Everytime that I run this code I got the following error:

--> Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/masterfolder/yougotmail.asp, line 134

-->Line 134 is the following:

Set ts = fso_OpenTextFile(strPath ,1)


I am submitting my code. Could you please check what I am doing wrong.

Thanks to all and have everyone a safe and Happy Thanksgiving!!!


Daniel
Hollywood, FL


'**************************************************
<%@ Language=VBScript%>
<% option Explicit %>

<%
dim ts, fso, strText
dim sFrom, sTo, sSubject, sDepartment




'** Getting the files for the big querystring
sFrom = trim(Request.Querystring(&quot;From&quot;))
sTo = trim(Request.Querystring(&quot;To&quot;))
sSubject = trim(Request.Querystring(&quot;Subject&quot;))
sDepartment = trim(Request.Querystring(&quot;Department&quot;))

ReadingTextFile()




'==========
'Subroutines
'==========

Sub ReadingTextFile()
dim strPath

strPath = &quot;\\sv5001\MassEmail\FS-1RECEIVED-EMAILS\xH1ERE021_01901.txt&quot;
Set fso = server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set ts = fso_OpenTextFile(strPath ,1)

Do while not ts.AtEndOfStream
strText = ts.Readline
'Some process here
Loop

ts.close
set ts = nothing
ts = nothing
end sub

%>
 
I know this is an obvious one, but are you sure you (or your webserver) have permission to read files in that directory?

Jacqui
 
Hi Tahnks for reply my request. I have another asp page that is having access to the same server and the whole server has 100% permission to access the folders, read and write


Thanks

Daniel
Hollywood, FL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top