Reading Text File From Ftp Server

I need to read a simple txt file where there are some variables. I've done
this a lot of times but in this case I have something different: the text
file is located at an ftp server.

The FTP server has anynomous access.

Anyone know how can I do this?

View Replies


ADVERTISEMENT

Server.MapPath For Reading From Text File

the source code is:

<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.OpenTextFile(Server.MapPath("") & "/learn.txt")
mystring=a.readAll
Response.Write ("<pre>" & mystring & "</pre>")

Set a = Nothing
Set fso = Nothing
%>

The output is:

abc
ABC

i don't understand this:

Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.OpenTextFile(Server.MapPath("") & "/learn.txt")

what should be insect in ("Scripting.FileSystemObject")?
and what should be insect in (Server.MapPath("") & "/learn.txt") ?

View Replies View Related

Response.Write Server.MapPath(".") & Reading From Text File

I found the complete physical path to the doman by Response.Write Server.MapPath(".") and the path is: C:Inetpubwwwrootmyweb"&"gg.txt

With this,there's still error to read my text file.The error source code is place at below,please help me do correction!!! Code:

View Replies View Related

Reading A TEXT File Without DB

I would like to know how I could accomplish this without using DB. There's a long text file named "TEST.TXT" The TEST file contains special character 'º' which will be used as pagebreak. I want an ASP page that will read the TEST.TXT file and split it into multiple web pages with navigation control. (eg. <FIRST<PREVIOUS>
<NEXT<LAST)

If it is possible

View Replies View Related

Reading Text File

I have a form that updates a text file. This text file writes variables (i.e. username = tom). This file is used to preview an HTML page and when you go to the form the variables are populated into the form fields again.

For some reason when someone else modifies the text file (using the form) I only see the old contents in the form fields. When I look at the preview HTML file, however, everything is fine.Why doesn't the form re-populate with the new info?

View Replies View Related

Text File Reading

i have a variable 'user', and a text file 'users.txt'. how can i search the text file and select the line thats the same as the variable 'user', then put that line into a variable?

'user' = 'root'

'users.txt' =

testuser1|kfkfjd
root|18273
test2|fjfkds

View Replies View Related

Reading A Text File

I need to create something that will read a text file and send e-mail statements from that text file. I know this is a basic application, but I am not sure where to start with this. The text file already contains all of the information for the statements. It is one file that starts with the customer e-mail address and then separates each statement by an <eob> marker. I need to be able to browse to upload the file and then have the application cycle through and generate all of the e-mails. I don't need to do any formatting to the text file, just read it and send the e-mails. The server currently uses CDOSYS to send other e-mails from a shopping cart application.

View Replies View Related

Reading From Text File

I have some messages in a text file.I would like to read one message every day from the text file. My Text file looks something like this

If you take medication for your blood pressure, you may need to be wary of adding certain pain relievers to your system. A class of pain-relieving anti-inflammatory medication often used to treat arthritis may interfere with a common blood pressure medication, according to research. The hash is just for demarcation. As I havent worked much with FileSystem can anyone help me how to go about acheiving the same.

View Replies View Related

Reading A Content Of Text File

I get a CD from O2 containing call data.I want to read the txt file on the CD and use the content of the textfile in an asp file to import to the database.But how do i read the file?

View Replies View Related

Problem With Writing/reading Text File

Here is what I have setup:

- a form that updates a text file.
- for example, in the form I have two fields, title and story. then, this write to a textfile (i.e. theinfo.asp). the update.asp file looks like this:

TSO.write "<%" & vbCrLf
TSO.write "title = """
TSO.write Request.Form("title")
TSO.write """" & vbCrLf
TSO.write "story = """
TSO.write Request.Form("story")
TSO.write """" & vbCrLf

- so, essentially it is creating an asp file with two variables.
- this works fine, it updates the file and i can call these variables in other pages. however, when i call these variables into a form : old versions of the variables populate the form: Code:

View Replies View Related

Reading And Writing Text File Using Vbscript

i had a vbscript that will read the text file from the bottom to the top, and after reading the file, it will be displayed in the screen, and the code look like this:
PHP Code: Code:

View Replies View Related

Site Search: Reading Text File ERROR

I have to make a site search function for my website. User types a keyword, and the search function searches through all the static pages for the keyword. The result of the search has to display the URL relating to the keyword, which the user can click to read the contents.

I had no idea how to go about doing it, finally I thought of using a textfile containing the word, and its related URL in the format: Code:

View Replies View Related

Reading File From Server

Consider the following code snippet:

<%
Dim objFSO,objOpenFile,strPath

strPath=Server.MapPath("ADList1.txt")
Set objFSO=Server.CreateObject("SCRIPTING.FILESYSTEMOBJECT")
Set objOpenFile=objFSO.OpenTextFile(strPath,1)
Do While Not objOpenFile.AtEndOfStream
Response.Write(objOpenFile.ReadLine() & "<br>")
Loop
objOpenFile.Close
Set objOpenFile=Nothing
Set objFSO=Nothing
%>

When I try to execute the above code, the code never gets executed. Neither
am I shown a script timeout error. After a lot of investigations, I
concluded that the code is not getting executed due to the presence of

Set objOpenFile=objFSO.OpenTextFile(strPath,1)

If I comment line nos. 3 to 8, then the code gets executed but as expected
without any output. Is this happening because of some permission which has
not been given to IIS 5.0? If so, what is it? I am working on Windows 2000
Professional.

View Replies View Related

Reading File From A Server

I understand i can not use Scripting.FileSystemObject to read a file that resident on another server and i need to use something else.

View Replies View Related

Reading File From A Server

i understand i can not use Scripting.FileSystemObject to read a file
that resident on another server and i need to use something else.

View Replies View Related

Writing Text File And Server.mappath

I have an application which was successfully writing data from submitted forms to a text file in a directory - in this case:

/data/findata.txt

This was fine because the forms lived at the root level with this directory.

Since then I have added enabled the forms to be used on subdirectories :

/subdirectory/myform.asp

I've used the same code for server.mapparth("data") etc - but instead of locating the directory at the root of the server called "data" it looks to the current directory- doesn't find it and creates another! eek!

What I need is a way to say "right, it doesnt matter what level you are at at the moment, always look at the root level /data directory"...

This has to be fairly dynamic - on the development server here its got a different file structure than on the live server (ie, it lives another level down again on the physical drive)...

Anyone got a good idea on how to look back up?

I do have one way to test which level they are at - but I feel that its a bit 'weak' - I have an ID that tells me if they are working on the upper or lower levels (ie, anything other than 1 is a lower level) - whilst I realise I could use this in the test I'm not sure if its going to be 100% fool proof to base this criteria on this ID.

Therefore I was hoping for a better way using the server.mappath etc...

View Replies View Related

Load Text File From A Remote Server?

Is there a way to load a text file from a remote server into a string much like using the Inet Control in VB? I am familiar with reading in RSS feeds, but what should I do if the content is a straight text file?

View Replies View Related

Edit And Save A Text File On The Server

how to creat a page that will allow the user to edit and save a text file on the server.

View Replies View Related

Need To Load File Path From Web Server Into Text Form Box

I need to load the file path of a file on a web server into a form text box. I tried using a normal form box using type=file but that just seems to return the file path from the local machine.

Ideally I'd like it if someone can get this to work with a file on a web server without using asp. If not then I suppose I'd have to use the FileSystemObject method. I can see how you can get a list of files from a remote server using FileSystemObject.

The problem I need help with is selecting a file path from the list of files into a text form box. The path of which I am then going to write to a database field.

View Replies View Related

Write Info On Form To Text File On Server

I want to write the info on a form to a text file. Code:

View Replies View Related

Write Data From A Database Field Into A Text File On The Server

Is there away to write data from a database field into a text file on the server.

The data would be more than one line.....

View Replies View Related

Reading Text Delimited

I have the below code found on an ASP site.

<%
arrName = Split(Request("TextArea"),",")
%>
<%
For i = LBound(arrName) To UBound(arrName)
Response.Write "ID: " & arrName(i) & "<br>"
Next
%>

I'm using a TextArea box to submit the following...
A123,1
B123,2
C123,3
Results are...
ID: A123
ID: 1 B123
ID: 2 C123
ID: 3
I expected something like...
A123 1
B123 2
C123 3
For the sake of understanding, why are the results like above?

In the end, I want to insert these values into a table.
A123 into Field1 .... 1 into Field2
B123 into Field1 .... 2 into Field2
C123 into Field1 .... 3 into Field2

Where do I start?

View Replies View Related

Reading Text Files

I was under the impression if I had a page with several database queries to 3 different databases, it would be faster if I just had the queries cached to text files since the query result won't change that often and I build the cache manually when needed.

So my question is would it be faster to just include text files instead of doing multiple Access and SQL queries on a web page?

View Replies View Related

Reading Xml From Another Server

i am working on a page which calls an asp page on another server with some xml and then gets some xml back. the page calls and returns the xml fine but trying to display that xml properly is the problem.

here is the code:

Code:
set req = Server.CreateObject("Msxml2.XMLHTTP")
req.Open "POST","http://www.domain.com/xmldata.asp", false

req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
req.send "username=foo&password=bar"

resp = req.ResponseText

response.write(resp)
so basically it just dumps raw xml into the browser at the moment. Code:

View Replies View Related

Reading The Server Mimemap.

I use the following code to read the server's mimemap and resove a file extension to a mime type:

Public Function GetMimeType(ByVal Extension)

Dim oMimeMap
Dim vntMimeType
Dim avntMap()

Set oMimeMap = GetObject("IIS://LocalHost/MimeMap")

If Left(Extension, 1) <> "." Then Extension = "." & Extension

avntMap() = oMimeMap.MimeMap

Code:

View Replies View Related

Reading Server Files

I have files on a server. I want to read the SERVER's File system and write out the filenames to the page. how can i do this?

View Replies View Related

Reading File

I have a routine I'm writing to read the contents of a file and modify it. However the file will not parse properly into an array, so I strongly suspect I'm using the wrong character to parse the file. The line of code that is supposed to parse the file is:

arrLines = Split(sFileContent, vbCRLF)

When I view the array, it appears as one continuous line, but when I open the file in a file editor it's very clear there are 15 lines.

View Replies View Related

Reading An Xls File

I've got a league standings file that gets uploaded as an xls file. To display the contents, I'm not sure what the most efficient way is:

1.) Import the xls file into a database every time the file is updated

2.) Read the contents of the xls file using OpenDataSource or OpenRow Set

3.) Something I haven't thought of yet!

View Replies View Related

Reading A Sql File

I've to got a login script, but in the middle of the verification script, I'd like once the vify has been ok'd to look for a sql file, that has insertion data in it, once the file has been found the asp code must read and carry out the sql command (insert the data in the access db), once done the sql file gets deleted. Code:

View Replies View Related

Reading From Csv File And ,

Im having a bit of trouble with taking a csv file and sperating each row with a "," because we all know that csv's are serpated by cammas, my problem is the rows are getting messy because say I have for the first Collum "Toy, Really fast", it will seperate the collum name because of the , Is there any way I can remove these or whats the best way.
Heres my code right now: Code:

View Replies View Related

Reading File

I am developing a web page, in that i have to get user's photo from user and insert it in to database. how to upload this photo from local drive to my server

View Replies View Related

Reading XML File

I am trying to read in an XML file I don't know the node/structure,so I basically just want to load in the file and then print out the entire file on the page through Response.Writes. how do I loop over the nodes if I don't know the names?

View Replies View Related

Reading An Xml File

i want to 'grab' an rss news feed from a public site that has the xml file published on an hourly basis. how do i do this in asp?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved