I have code that is working correctly to download a text file from an FTP server, however that text file comes across as one big long run-on string. The text file I'm downloading is a listing of access codes delimited by a carriage return, which i eventually need to modify and re-upload, so the file needs to stay in-tact in regards to the formatting of it. Is there any way to download the file as-is and not have it return as a big pile of characters? This is my first attempt at pulling down a file from FTP so I'm hoping there is just something easy I am missing.
The code I am using currently to get the file and save it is:
string serverpath = "ftp://ftpsite.com/codefile.txt
FtpWebRequest request = (FtpWebRequest)WebRequest.
request.Method = WebRequestMethods.Ftp.DownloadFile
request.Credentials = new NetworkCredential("usernam
FtpWebResponse response = (FtpWebResponse)request.Ge
Stream responseStream = response.GetResponseStream
StreamReader reader = new StreamReader(responseStrea
StreamWriter writer = new StreamWriter("Y:\\download