Hi

I need to read some values from a text file stored in the server(later
on,these values will be assigned to a set of variables).
Is there a way to do such a thing using VBScript embedded in a ASP page?
Thanx in advance.

--
remove NOSPAM to send emails
ICQ #8860533

Re: reading values from a text file by Ray

Ray
Tue Jan 20 08:56:21 CST 2004

You can use the FSO object to open text files and get the contents.

http://msdn.microsoft.com/library/en-us/script56/html/FSOoriFileSystemObject.asp

Ray at work

"Francesco" <come_stavamo_ieriNOSPAM@yahoo.it> wrote in message
news:o9f63oz11xn6$.h3xhggp6x7k3.dlg@40tude.net...
> Hi
>
> I need to read some values from a text file stored in the server(later
> on,these values will be assigned to a set of variables).
> Is there a way to do such a thing using VBScript embedded in a ASP page?
> Thanx in advance.
>
> --
> remove NOSPAM to send emails
> ICQ #8860533



Re: reading values from a text file by lbelloeil

lbelloeil
Tue Jan 20 13:38:49 CST 2004

Try this :

Dim FSO, Infile, YR, path, txtData

path = "\\myserver\myfharedfolder\"
YR=DatePart("YYYY", Date)

set FSO = createObject("Scripting.FileSystemObject")

Set Infile = FSO.OpenTextFile(path & YR & ".log", 1,False)
txtData = infile.readall
aLines = split(txtData , vbCrlf)
For Each line In aLines
RetCode= msgbox(txtData,vbOkonly,"File")
Next
Infile.close

From this thread :http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=63383ad5.0401190524.37b091ce%40posting.google.com&rnum=1&prev=/groups%3Fdq%3D%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dmicrosoft.public.scripting.vbscript%26selm%3D63383ad5.0401190524.37b091ce%2540posting.google.com

Re: reading values from a text file by Francesco

Francesco
Thu Jan 22 02:16:32 CST 2004

On 20 Jan 2004 11:38:49 -0800, *Globule* wrote:

> Try this :

[CUT]

Thank you !

--
remove NOSPAM to send emails
ICQ #8860533

Re: reading values from a text file by Francesco

Francesco
Thu Jan 22 02:17:00 CST 2004

On Tue, 20 Jan 2004 09:56:21 -0500, *Ray at <>* wrote:

> You can use the FSO object to open text files and get the contents.
>
> http://msdn.microsoft.com/library/en-us/script56/html/FSOoriFileSystemObject.asp
>
> Ray at work

Thank you !

--
remove NOSPAM to send emails
ICQ #8860533