|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to Append to a File via FTPHere is my problem: I need to append a string to a file every time the
user downloads this file. The string is different for every user. I would like to append the string to the file via ftp. But I am not sure how I can do this, I've never written an FTP client. Which class can I use to do this? Is it possible to append to a file that already is in an FTP server? Will the FTPWebRequest class work? Thanks in advance for your ideas, Simone * Simone M wrote:
> Here is my problem: I need to append a string to a file every time the To append to a file you'd have to retrieve the file, append your data,> user downloads this file. The string is different for every user. I > would like to append the string to the file via ftp. But I am not sure > how I can do this, I've never written an FTP client. Which class can I > use to do this? Is it possible to append to a file that already is in > an FTP server? Will the FTPWebRequest class work? and upload the altered file. This is how FTP works, it's designed for transfering files it's not a fileserving application with normal file access semantics. Mr Flibble You got my point. But I was looking to save on bandwidth, since it's a
large file, and having to retrieve the file costs bandwith. I wish I could just do some cutting/appending operations on the file, but I guess it's not possible without having to retrieve it ??? Thanks, Simone I'm not following you. It *sounds* like you are working from the server end,
and that when an FTP client requests a file, it is appended to prior to attaching it to the response stream. If so, you don't need to create an FTP client, but an FTP server. And the server app would not need FTP to append to the file, which is on the server. It would append to it prior to returning it. OTOH, if you are working with an FTP client that downloads files, and youy want to append to the downloaded file, there is also no need to do it via FTP. The client app can append to the downloaded file prior to returning it or saving it. Perhaps you should outline the actual requirements for your app, rather than the methodology you think you need to employ to satisfy those requirements. -- Show quoteHide quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Simone M" <simone_mayn***@hotmail.com> wrote in message news:1144937272.300114.46330@g10g2000cwb.googlegroups.com... > Here is my problem: I need to append a string to a file every time the > user downloads this file. The string is different for every user. I > would like to append the string to the file via ftp. But I am not sure > how I can do this, I've never written an FTP client. Which class can I > use to do this? Is it possible to append to a file that already is in > an FTP server? Will the FTPWebRequest class work? > Thanks in advance for your ideas, > Simone > Thanks Kevin.
You have lead me to the right direction. I was thinking wrong. I don't need to use FTP. I could append the data to the file on the server before the user downloads it since I have acess to the file on the server. I guess this is a common problem. Just a question: What do you mean by Response Stream? Can't I accomplish this by just using a FileStream? Hi Simone,
If you want to append to the file before returning it, you're going to have to handle the FTP Request. That means that you need to write an FTP server that will receive the RETR command, fetch the file specified, append to it, and then send the appended file to the client. -- Show quoteHide quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Simone M" <simone_mayn***@hotmail.com> wrote in message news:1144956482.991332.259260@i39g2000cwa.googlegroups.com... > Thanks Kevin. > You have lead me to the right direction. I was thinking wrong. I don't > need to use FTP. I could append the data to the file on the server > before the user downloads it since I have acess to the file on the > server. I guess this is a common problem. > Just a question: What do you mean by Response Stream? > Can't I accomplish this by just using a FileStream? >
Other interesting topics
Cast my custom class into System.String
Problem assigning event handler to object.event XML Querying .....??? Retrieving the COM class factory for a component failed moving selected item New as applied to arrays Reading from .DBF in DBaseIII unmanaged structs in struct with c# Access the "global" focused control from C# app-. DataSet to Crystal report? |
|||||||||||||||||||||||